<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 24/08/16 16:18, Stephen More wrote:<br>
</div>
<blockquote
cite="mid:CAL2vA_MzFGgYxfoGunWqNaEywz2SgRppyUJj1A1-rSiKE8A-DA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>JIRA issue has been created: <a moz-do-not-send="true"
href="https://issues.jboss.org/browse/KEYCLOAK-3470">https://issues.jboss.org/browse/KEYCLOAK-3470</a></div>
</div>
</blockquote>
Thanks<br>
<blockquote
cite="mid:CAL2vA_MzFGgYxfoGunWqNaEywz2SgRppyUJj1A1-rSiKE8A-DA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div> <br>
<br>
</div>
Yes, I have the ability to add Servlet Filters.<br>
</div>
</blockquote>
Cool. So then you can do something like in the servlet filter:<br>
<br>
KeycloakPrincipal principal = (KeyclaokPrincipal)
servletRequest.getPrincipal();<br>
SomeThreadLocalHolder.set(principal);<br>
<br>
Marek<br>
<blockquote
cite="mid:CAL2vA_MzFGgYxfoGunWqNaEywz2SgRppyUJj1A1-rSiKE8A-DA@mail.gmail.com"
type="cite">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Aug 24, 2016 at 4:43 AM, Marek
Posolda <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>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?<br>
<br>
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?<br>
<br>
Marek
<div>
<div class="h5"><br>
<br>
On 23/08/16 22:07, Stephen More wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">
<div>
<div>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<span style="color:rgb(150,152,150);font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;line-height:20px;text-align:start;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;display:inline!important;float:none;background-color:rgb(255,255,255)">.</span><br>
<br>
org.jasig.cas.client.<wbr>validation.Assertion
assertion = org.jasig.cas.client.util.<wbr>AssertionHolder.getAssertion()<wbr>;<br>
org.jasig.cas.client.<wbr>authentication.<wbr>AttributePrincipal
principal = assertion.getPrincipal();<br>
<br>
<br>
</div>
Does keycloak have a similar function to access
the org.keycloak.KeycloakPrincipal without
access to the HttpServletRequest ?<br>
<br>
</div>
-Thanks <br>
<div>
<div>
<div>
<div><br>
<br>
<br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>______________________________<wbr>_________________
keycloak-user mailing list
<a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/keycloak-user</a></pre>
</blockquote>
</div>
</blockquote></div>
</div>
</blockquote>
</body></html>