Repository navigation
Custom claims are not added to token after keycloak version update from 26.1.2 to 26.3.3 #42101
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've updated keycloak version from 26.1.2 to 26.3.3.
We have a custom context mapper where we add custom claims to the token, overriding the method
ContextMapper extends AbstractOIDCProtocolMapper implements OIDCAccessTokenMapper, OIDCIDTokenMapper, UserInfoTokenMapper, TokenIntrospectionTokenMapper {}locally, when I get an access token, then extract JWT token I can see that it contains custom claims, but in the deployed version, when the access token request contains custom client scope, the access token doesn't contain custom claims. When I changed the keycloak logs, I noticed that transformAccessToken method not called as the logs that I added are missing.
I can't find what changed in Keycloak between those two versions that affected to token custom claims.
Can you help me find the problem?
Here is the client defination in deployment
All reactions