<div dir="ltr">Awesome! Easy enough.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 2, 2014 at 6:06 AM, Bill Burke <span dir="ltr"><<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In beta-1 you can do the following in JAX-RS:<br>
<br>
@Context SecurityContext securityContext;<br>
<br>
KeycloakPrincipal principal =<br>
(KeycloakPrincipal)securityContext.getUserPrincipal();<br>
<div><div class="h5"><br>
<br>
<br>
On 6/2/2014 2:40 AM, Josh wrote:<br>
> Hi,<br>
><br>
> Looking through the examples I see a few client examples obtaining<br>
> a KeycloakSecurityContext from the HttpServletRequest object via<br>
> getAttribute.<br>
><br>
> ie.<br>
><br>
> KeycloakSecurityContext session = (KeycloakSecurityContext)<br>
> req.getAttribute(KeycloakSecurityContext.class.getName());<br>
><br>
> Wondering how this would be done for examples like the<br>
> "database-service" jax-rs example?<br>
><br>
> My goal is to be able to have access to the IDToken information for a<br>
> rest call.<br>
><br>
> --<br>
><br>
> Thanks,<br>
><br>
> Josh<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> keycloak-user mailing list<br>
> <a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" target="_blank">http://bill.burkecentral.com</a><br>
_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</font></span></blockquote></div><br></div>