[cdi-dev] Types of Principal object
arjan.tijms at gmail.com
Wed Apr 26 12:00:40 EDT 2017
On Wed, Apr 26, 2017 at 4:48 PM, Matej Novotny <manovotn at redhat.com> wrote:
> 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?).
That would be kinda disputable indeed :O
> Therefore, it is safer/viable to create a proxyable wrapper object which
> implements Principal only and delegetas calls (that's what Weld does).
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...
> Otherwise I agree it could be nice to ahve a way to cast the object as the
> pure Principal interface doesn't help much.
> ----- Original Message -----
> > From: "John Ament" <john.ament at spartasystems.com>
> > To: "cdi-dev" <cdi-dev at lists.jboss.org>
> > Sent: Wednesday, April 26, 2017 3:54:57 PM
> > Subject: [cdi-dev] Types of Principal object
> > Hey guys
> > I raised a bug against the Weld guys, but think its worth an EG
> > When a Principal object is injected, the only type it has is Principal.
> > does not retain the actual type used at runtime. This threw me off on
> > Keycloak integration I'm working on (in $dayjob). So I was wondering, is
> > this expected from our POV or should it retain the types of the actual
> > runtime instance?
> > John
> > NOTICE: This e-mail message and any attachments may contain confidential,
> > proprietary, and/or privileged information which should be treated
> > accordingly. If you are not the intended recipient, please notify the
> > immediately by return e-mail, delete this message, and destroy all
> > and electronic copies. Thank you.
> > _______________________________________________
> > cdi-dev mailing list
> > cdi-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/cdi-dev
> > Note that for all code provided on this list, the provider licenses the
> > under the Apache License, Version 2
> > (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas
> > provided on this list, the provider waives all patent and other
> > property rights inherent in such information.
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> Note that for all code provided on this list, the provider licenses the
> code under the Apache License, Version 2 (http://www.apache.org/
> licenses/LICENSE-2.0.html). For all other ideas provided on this list,
> the provider waives all patent and other intellectual property rights
> inherent in such information.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cdi-dev