[keycloak-user] How to get user details

Subodh Joshi subodhcjoshi82 at gmail.com
Thu May 17 08:10:11 EDT 2018


You did not mentioned which technology you are using its JS or Java .I
Assumed its Java you can check below sample code.

>  KeycloakSecurityContext securityContext = (KeycloakSecurityContext)
> httpRequest.getAttribute(KeycloakSecurityContext.class.getName());
>  AccessToken accessToken = securityContext.getToken();
>           if(null != accessToken ){
>           userId = accessToken.getPreferredUsername();
> }
>

On Tue, May 15, 2018 at 2:26 PM valsaraj pv <valsarajpv at gmail.com> wrote:

> Hi,
>
> User redirected to Keyclock & after successful login user redirected back
> to application. Now there is no user information stored on application
> side. Earlier it was in LDAP & we fetch user details from LDAP. Now how to
> get user details in Keyclock based login scenario?
> Please share if any useful links.
>
> Thanks,
> Valsaraj Viswanathan
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>


-- 
Subodh Chandra Joshi
subodh1_joshi82 at yahoo.co.in
http://www.trendsinnews.com


More information about the keycloak-user mailing list