[jboss-user] [JBoss Seam] - Re: JAAS Authentication and the actor
harpritt
do-not-reply at jboss.com
Tue Jul 24 09:18:41 EDT 2007
Hope this helps another poor sole...
this is how i populate my actor object from the identity
public boolean login() {
actor.setId(identity.getUsername());
Iterator principleItr = identity.getSubject().getPrincipals().iterator();
while(principleItr.hasNext()){
Object principle = principleItr.next();
if (principle instanceof SimpleGroup){
SimpleGroup simpleGroup = (SimpleGroup) principle;
Enumeration simpleGroupMembers = simpleGroup.members();
while(simpleGroupMembers.hasMoreElements()){
SimplePrincipal aPrincipal = (SimplePrincipal)simpleGroupMembers.nextElement();
actor.getGroupActorIds().add(aPrincipal.getName());
}
}
}
return true;
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066994#4066994
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066994
More information about the jboss-user
mailing list