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:
-ThanksI 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.Does keycloak have a similar function to access the org.keycloak.KeycloakPrincipal without access to the HttpServletRequest ?
org.jasig.cas.client.validation.Assertion assertion = org.jasig.cas.client.util. AssertionHolder.getAssertion() ;
org.jasig.cas.client.authentication. AttributePrincipal principal = assertion.getPrincipal();
_______________________________________________ keycloak-user mailing list keycloak-user@lists.jboss.org https://lists.jboss.org/ mailman/listinfo/keycloak-user