- changed status to resolved
JWT aud claim changing array to string for single value
Issue #293
resolved
When converting aud claims to json object, if the size of aud claims list is one, it is generating aud as a string value. We are using version Nimbus JWT 5.7. This version doesnot support generating token with aud as json array with single value. It is working fine in version 2.22.1 where single valued aud claims is also converted to json array. Because of this change our customers are not able to parse the token. Can we support single values aud claim to generate aud json array with a flag?
Comments (1)
-
- Log in to comment
Pass the audience via the generic
claim
method:https://static.javadoc.io/com.nimbusds/nimbus-jose-jwt/6.5/com/nimbusds/jwt/JWTClaimsSet.Builder.html#claim-java.lang.String-java.lang.Object-
as
claim("aud", "xyz")
.This should work :)