Closed vbarrier closed 9 years ago
@vbarrier why do you think it is an error? As far as I know, the getXXXClaim
methods just return them in XXX
format. I'm requesting them in an array format (I could have used getStringListClaim()
as well) because is the way I generate them on the first place, as per this line:
claimsSet.setCustomClaim('roles', details.authorities?.collect { it.authority })
roles
in JSON format will always be like ["ROLE_A", "ROLE_B"]
With getStringArrayClaim I get an error:
2015-03-26 18:24:06,604 [http-nio-8080-exec-6] ERROR [/prember].[default] - Servlet.service() for servlet [default] in context with path [/prember] threw exception
Message: No signature of method: com.nimbusds.jwt.JWTClaimsSet.getStringArrayClaim() is applicable for argument types: (java.lang.String) values: [roles]
Possible solutions: getStringClaim(java.lang.String)
Line | Method
->> 55 | loadUserByToken in com.odobo.grails.plugin.springsecurity.rest.token.storage.jwt.JwtTokenStorageService
Okey... I found why I had an error on this.
I had a plugin with :
compile 'com.nimbusds:nimbus-jose-jwt:3.1.1'
I removed that dependency and know it works with StringArrayClaim :)
In 1.5.0M2 there is an error :
should be