[
https://issues.jboss.org/browse/CDI-597?page=com.atlassian.jira.plugin.sy...
]
Romain Manni-Bucau commented on CDI-597:
----------------------------------------
[~arjant] it is in JAAS so should be supported somehow (but LoginContext is not
mandatory). +100 to move it to security spec. That said it means principal injection moves
too since today it is in CDI (shouldn't have been I agree)
Make Principal unwrappable
--------------------------
Key: CDI-597
URL:
https://issues.jboss.org/browse/CDI-597
Project: CDI Specification Issues
Issue Type: Epic
Reporter: Romain Manni-Bucau
CDI allows to get injected a Principal but often you need to access the actual Principal
instance when you need more than a name. Since the injection is a proxy (otherwise it
would be broken in most of scoped wrapper instances cases) we would need a CDI solution
to unwrap this instance.
Solution I see without creating a new kind of API but just something specific to this
case: CDIPrincipal extends Principal { <T> T unwrap(Class<T> t) } and allow to
get it injected directly as Principal today.
This issue can be linked to CDI-10 but here it is safe to add unwrap() where on CDI-10 it
is not (too general).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)