<div dir="ltr">Hi,<div><br></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 26, 2017 at 4:48 PM, Matej Novotny <span dir="ltr">&lt;<a href="mailto:manovotn@redhat.com" target="_blank">manovotn@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And spec requires all built-in beans to be decorable - e.g. you need them to be proxyable (although the added value of principal decorator is ...eh, disputable at best?).<br></blockquote><div><br></div><div>That would be kinda disputable indeed :O</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Therefore, it is safer/viable to create a proxyable wrapper object which implements Principal only and delegetas calls (that&#39;s what Weld does).<br></blockquote><div><br></div><div>As i mentioned, the proxy has to be there as just injecting a non-proxy Principal would not work correctly. If a logout call is done, the injected Principal would still be the principal that it was before, let alone what happens if the Principal is inject in application scoped beans...</div><div><br></div><div>Kind regards,</div><div>Arjan Tijms</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Otherwise I agree it could be nice to ahve a way to cast the object as the pure Principal interface doesn&#39;t help much.<br>
<span class="HOEnZb"><font color="#888888"><br>
Matej<br>
</font></span><span class="im HOEnZb"><br>
----- Original Message -----<br>
&gt; From: &quot;John Ament&quot; &lt;<a href="mailto:john.ament@spartasystems.com">john.ament@spartasystems.com</a>&gt;<br>
&gt; To: &quot;cdi-dev&quot; &lt;<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a>&gt;<br>
&gt; Sent: Wednesday, April 26, 2017 3:54:57 PM<br>
&gt; Subject: [cdi-dev] Types of Principal object<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hey guys<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I raised a bug against the Weld guys, but think its worth an EG discussion.<br>
&gt; When a Principal object is injected, the only type it has is Principal. It<br>
&gt; does not retain the actual type used at runtime. This threw me off on some<br>
&gt; Keycloak integration I&#39;m working on (in $dayjob). So I was wondering, is<br>
&gt; this expected from our POV or should it retain the types of the actual<br>
&gt; runtime instance?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; John<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</span><span class="im HOEnZb">&gt; NOTICE: This e-mail message and any attachments may contain confidential,<br>
&gt; proprietary, and/or privileged information which should be treated<br>
&gt; accordingly. If you are not the intended recipient, please notify the sender<br>
&gt; immediately by return e-mail, delete this message, and destroy all physical<br>
&gt; and electronic copies. Thank you.<br>
&gt;<br>
</span><div class="HOEnZb"><div class="h5">&gt; ______________________________<wbr>_________________<br>
&gt; cdi-dev mailing list<br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/cdi-dev</a><br>
&gt;<br>
&gt; Note that for all code provided on this list, the provider licenses the code<br>
&gt; under the Apache License, Version 2<br>
&gt; (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/<wbr>licenses/LICENSE-2.0.html</a>). For all other ideas<br>
&gt; provided on this list, the provider waives all patent and other intellectual<br>
&gt; property rights inherent in such information.<br>
______________________________<wbr>_________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/cdi-dev</a><br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" target="_blank">http://www.apache.org/<wbr>licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
</div></div></blockquote></div><br></div></div>