[jboss-user] [Security & JAAS/JBoss] - Re: HTTP Auth & callerPrincipal
ragavgomatam
do-not-reply at jboss.com
Thu Mar 6 13:24:58 EST 2008
Do this...
sessionContext.getCallerPrincipal ().getClass().getName()
It will always be an instance java.security.Principal. If you want your userObj to be returned, then make your userObj implement java.security.Principal interface and instantiate it in your LoginModule. So now your UserObj becomes the type Principal & you are set.
I picked this from javadocs for javax.ejb.EJBContext. SessionContext extends this.
public java.security.Principal getCallerPrincipal()Obtain the java.security.Principal that identifies the caller.
| Returns:
| The Principal object that identifies the caller. This method never returns null.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134643#4134643
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134643
More information about the jboss-user
mailing list