Closed janosrusiczki closed 1 year ago
Hi @janosrusiczki, thanks for your collaboration, and sorry for taking so long to get back to you. To be sure I understand, what is the use case for it? Is it to support GraphQL endpoints?
Yes, precisely. GraphQL endpoints are actually singular, so it's a GraphQL endpoint. That's why I implemented this, to be able to differentiate somehow which request does the token dispatch and which the revocation.
Thanks for giving the context. Using the GraphQL endpoint is an opinionated solution, and I wouldn't like to provide 1st class support here. It adds a complexity that doesn't need to be here. I recommend you implement your custom solution on top of devise-jwt if you want to go that way. Apologies for having taken so long before deciding not integrating this and, again, many thanks for taking the time to submit it.
No problemo, I've been using a fork for a while now. Maybe I'll see about extending / monkey patching later.
Thinking about performance I noticed that
Rack::Request.new(env).body
returns a StringIO object which is only read if needed - that is, the regular expression to match the request body against is present. So this shouldn't be an issue.To do:
Fixes #254