[keycloak-user] Getting the user id from the access token

Juan Diego juandiego83 at gmail.com
Fri Jul 10 18:48:44 EDT 2015


Hi

I want to be able to update the user password and some preferences from my
web app, in order to update some of the user info from my portal i can see
in the rest api that you need the user ID.
I have a backend with java that should connect to my keycloak server once
it gets the token

KeycloakSecurityContext securityContext = (KeycloakSecurityContext)
httpRequest
                .getAttribute(KeycloakSecurityContext.class.getName());

AccessToken accessToken = securityContext.getToken();

I dont know how to get info from the accesToken, or does the access token
class already has methods to do that.  I know this is more of a question of
design.  This part is not really clear for me.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150710/fdca4052/attachment.html 


More information about the keycloak-user mailing list