-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
AUD as only array breaks legacy/existing implementations #944
Comments
Hi there!
How was that output produced? It's not clear to me what you mean by The changes related to #77 ensure that an Jwts.builder()
.audience().single("singleAudValue").and()
... etc ...
.compact(); This is documented for the When parsing a JWT however, the
So JJWT However, you still have the ability to produce a single-string audience value for JWT recipients that do not process Does this help? |
Thanks for the quick response - this sort of helps but our code normally passes in the claims as a map.
for re-use. As for your question, our JWT parsing code works fine, it's when we send JWT's to 3rd-parties. Is there a way to get the FYI: this is much better than us using content() and creating the payload json ourselves. |
What JJWT version are you using? #891 was merged and released in 0.12.4 and this should retain
Latest version is 0.12.5. |
Ah, we are using 0.12.3 which was the default version for used by our version of spring boot/security. Thank you. |
Great to hear! Thanks for the update 👍 |
When you fixed issue: #77, you changed the functionality to only use arrays. In this issue, #787, you contemplated having a single audience aka aud parameter remain backwards compatible and not an array (its even stated that the spec supports both).
I think its a bug to not remain backwards compatible because a lot of existing services that consume JWT's don't support audience being an array.
Expected:
{ "aud": "audience", "exp": 1715888139211, "sub": "subject", "iat": 1715884539211, "jti": "77c6e241-79a1-435a-8a33-0d87f0d419d5", "iss": "issuer" }
Now Get:
{ "aud": [ "audience" ], "exp": 1715888139211, "sub": "subject", "iat": 1715884539211, "jti": "77c6e241-79a1-435a-8a33-0d87f0d419d5", "iss": "issuer" }
The text was updated successfully, but these errors were encountered: