[keycloak-user] Obtaining the KeycloakSecurityContext from a jaxrs / Bearer Only service

Josh smysnk at gmail.com
Mon Jun 2 02:40:11 EDT 2014


Hi,

Looking through the examples I see a few client examples obtaining
a KeycloakSecurityContext from the HttpServletRequest object via
getAttribute.

ie.

KeycloakSecurityContext session = (KeycloakSecurityContext)
req.getAttribute(KeycloakSecurityContext.class.getName());

Wondering how this would be done for examples like the "database-service"
jax-rs example?

My goal is to be able to have access to the IDToken information for a rest
call.

--

Thanks,

Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20140602/c41693c7/attachment-0001.html 


More information about the keycloak-user mailing list