-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove backwards compatibility hack for JWT aud #1155
Comments
This breaks usage of my OAuth 2.0 implementation using v8.2.4. I'm storing OAuth attributes inside my application. For this my middleware looks like:
This works fine with version 3.4.2 of lcobucci/jwt. @Sephster What can I do for further investigation? |
What is the aud claim returning in the later version. Can you provide a var dump of this please? Thanks |
I don't know exactly what you mean. Dump of
And I think, I have a solution for this. As you can see, I'm using numeric/integer IDs which refer to my database models (I have models for scope, clients, users etc.). Looking into source one can see, that you pass raw value of It seems, that it is a problem of JWT and not of OAuth. Maybe you can dig into it and decide if my approach can be integrated in OAuth2 nevertheless. PS: Maybe I'm using OAuth2 in a completely wrong manner, but I thought it would be best to deal with entity IDs of database model. Shouldn't I? PPS: I've seen that user identifier is casted to string already. So this may be possible for client ID too? |
The latest version of lcobucci/jwt passes an array instead of a string for the
aud
claim. To prevent breaking changes, if this array contains a single value, we convert it to a string to retain past behaviour.When upgrading to v9, we must remove this compatibility hack.
The text was updated successfully, but these errors were encountered: