users@glassfish.java.net

Set Principal in WEB Container upon custom Login

From: <glassfish_at_javadesktop.org>
Date: Thu, 04 Jun 2009 06:48:23 PDT

Hello,
I have an application using JSF en JAAS with a custom realm and principal
The login pages are working perfectly.
Here is how it works:
I have a managed beans containing all my authentication code. Its authentication method is called when I submit the login form. It calls the JAAS API and does the authentication. The result is a principal.

But now I want to pass the principal through my EJB to implements security and use that Principal info.
How can I set the principal in my Web Application layer ?
The getCallerPrincipal returns also "ANONYMOUS".

Thanks,
[Message sent by forum member 'bencal' (bencal)]

http://forums.java.net/jive/thread.jspa?messageID=349125