Skip to content
Discussion options

You must be logged in to vote

Indeed.

Using the following, works
protected String getAccessToken(String userName) { return keycloakClient.getAccessToken(userName, userName, "backend-service", "secret", List.of("openid")); }
This gives a null access token (which I also find strange)
protected String getAccessToken(String userName) { return keycloakClient.getAccessToken(userName, userName, "backend-service", "secret", List.of("profile", "openid")); }

Anyway, in our code we didn't have to set it the property explicitly as it is set implicitly when role source is set to userinfo. So removing the setting solved it as well.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@sberyozkin
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sberyozkin
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants