wood burning stoves*
The moose likes JSP and the fly likes getUserPrincipal don't return user principal :( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "getUserPrincipal don Watch "getUserPrincipal don New topic
Author

getUserPrincipal don't return user principal :(

alexandre russel
Greenhorn

Joined: Nov 28, 2005
Posts: 16
Hi,
I created a login module with JBoss. It create the callerPrincipal:
SimpleGroup roles = new SimpleGroup("Roles");
SimpleGroup callerPrincipal = new SimpleGroup("CallerPrincipal");
SimpleGroup cpLogin = new SimpleGroup("login");
cpLogin.addMember(new SimplePrincipal("my login name"));
SimpleGroup cpId = new SimpleGroup("id");
cpId.addMember(new SimplePrincipal("my id"));
callerPrincipal.addMember(cpLogin);
callerPrincipal.addMember(cpId);
roles.addMember(new SimplePrincipal("manager"));
log.debug(callerPrincipal.toString());
Group[] roleSets = {roles, callerPrincipal};

the log file gives me: CallerPrincipal(members:login(members:my login name),id(members:my id))

Everything is fine but when I call userPrincipal from a JSP:
java.security.acl.Group group = (java.security.acl.Group) request.getUserPrincipal();
<%= group.toString() %><br/>

then only the first member of the callerPrincipal group is there .
login(members:my login)

How can I access the rest of my group?
thanks for your help.
alex
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getUserPrincipal don't return user principal :(
 
Similar Threads
FORM based JAAS authentication. LoginHandler needs more info.
java.lang.SecurityException: Authentication exception, principal=null
Problems with JAAS in JBoss
Problems with Form Based Authentication
Can't get my custom principal using getCallerPrincipal