[jboss-user] [Security & JAAS/JBoss] - Re: How to set EJBContext callerPrincipal from LoginModule?
bhawthorne
do-not-reply at jboss.com
Wed May 13 18:45:34 EDT 2009
"bbunderson" wrote :
| Does anyone out there have a suggested work around for this problem?
Unholy access via reflection. This works for us:
| Field rmField = EJBContextImpl.class.getDeclaredField("rm");
| rmField.setAccessible(true);
| RealmMapping rm = (RealmMapping)rmField.get(ejbContext);
|
| Principal callerPrincipal = ejbContext.getCallerPrincipal();
| CustomPrincipal customPrincipal = (CustomPrincipal)rm.getPrincipal(callerPrincipal);
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230965#4230965
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230965
More information about the jboss-user
mailing list