-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Resource server token introspection - ClassCastException #153
Comments
This is a tricky question: the JWT spec states that the JSON value in the token payload should be a I am almost sure that Spring didn't map the value at the time the default It would certainly be safer if this authentication converter was adapting to the type of value returned by the Java representation of the token claims. EditThe spec I link about JWTs is completely irrelevant: the introspected token can be in any format. What we are interested in is the format of the payload for the token introspection endpoint. But, according to this spec, the Got it: the claims are altered in As each introspector implementation could have its own claim alteration rules, I'll have the default authentication converter accept |
@cezaryluksza I just released a fix in |
It works, thank you! |
Hi
I decided to add token introspection to my resource server.
I followed this tutorial: https://github.com/ch4mpy/spring-addons/blob/spring-addons-7.1.8/samples/tutorials/resource-server_with_introspection/README.md
And I'm getting this exception in introspectionAuthenticationConverter():
Attributes from my token:
iat -> {Instant@22266} "2023-11-06T10:48:02Z"
exp -> {Instant@22264} "2023-11-06T20:48:00Z"
I use keycloak token introspection endpoint.
Expected behavior
I think converter shouldn't assume that these attributes are castable to integers, but please correct me if I'm wrong.
Sample token JSON payload after anonymization (generated random UUID):
The text was updated successfully, but these errors were encountered: