[keycloak-user] How can I access org.keycloak.KeycloakPrincipal without javax.servlet.http.HttpServletRequest

Stephen More stephen.more at gmail.com
Wed Aug 24 10:18:26 EDT 2016


JIRA issue has been created: https://issues.jboss.org/browse/KEYCLOAK-3470

Yes, I have the ability to add Servlet Filters.

On Wed, Aug 24, 2016 at 4:43 AM, Marek Posolda <mposolda at redhat.com> wrote:

> AFAIK we don't have support for that, but hopefully we can add adapter
> option, which will add KeycloakPrincipal to threadLocal. Might be useful
> for frameworks/apps where the access to servletRequest is not possible.
> Could you create JIRA?
>
> Which web framework are you using btv? Do you at least have possibility to
> add servletFilter, which will put the KEycloakPrincipal to threadLocal, so
> you can access that in your app?
>
> Marek
>
>
> On 23/08/16 22:07, Stephen More wrote:
>
> I am familiar with the Apereo CAS Client, that project has an
> AssertionThreadLocalFilter that allows one to access the principal without
> having direct access to the web tier session.
>
> org.jasig.cas.client.validation.Assertion assertion =
> org.jasig.cas.client.util.AssertionHolder.getAssertion();
> org.jasig.cas.client.authentication.AttributePrincipal principal =
> assertion.getPrincipal();
>
>
> Does keycloak have a similar function to access the
> org.keycloak.KeycloakPrincipal without access to the HttpServletRequest ?
>
> -Thanks
>
>
>
>
>
> _______________________________________________
> keycloak-user mailing listkeycloak-user at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/keycloak-user
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160824/b86244ab/attachment.html 


More information about the keycloak-user mailing list