org.mortbay.jaas
Class JAASUserPrincipal
java.lang.Object
org.mortbay.jaas.JAASUserPrincipal
- Principal
public class JAASUserPrincipal
extends java.lang.Object
implements Principal
JAASUserPrincipal
Implements the JAAS version of the
org.mortbay.http.UserPrincipal interface.
$Id: JAASUserPrincipal.java,v 1.6 2004/07/01 19:12:08 janb Exp $
void | disassociate() - Clean out any pushed roles that haven't been popped
|
String | getName() - Get the name identifying the user
|
Group | getRoles() - Determine the roles that the LoginModule has set
|
Subject | getSubject() - Provide access to the current Subject
|
boolean | isUserInRole(String roleName) - Check if user is in role
|
void | popRole() - Remove temporary association between user and role.
|
void | pushRole(String roleName) - Temporarily associate a user with a role.
|
void | setRoleCheckPolicy(RoleCheckPolicy policy) - Set the type of checking for isUserInRole
|
protected void | setSubject(Subject subject) - Sets the JAAS subject for this user.
|
JAASUserPrincipal
public JAASUserPrincipal(String name)
Constructor.
name
- the name identifying the user
disassociate
public void disassociate()
Clean out any pushed roles that haven't been popped
getName
public String getName()
Get the name identifying the user
getRoles
public Group getRoles()
Determine the roles that the LoginModule has set
getSubject
public Subject getSubject()
Provide access to the current Subject
isUserInRole
public boolean isUserInRole(String roleName)
Check if user is in role
- true or false accordint to the RoleCheckPolicy.
popRole
public void popRole()
Remove temporary association between user and role.
pushRole
public void pushRole(String roleName)
Temporarily associate a user with a role.
setRoleCheckPolicy
public void setRoleCheckPolicy(RoleCheckPolicy policy)
Set the type of checking for isUserInRole
setSubject
protected void setSubject(Subject subject)
Sets the JAAS subject for this user.
The subject contains:
- the user's credentials
- Principal for the user's roles
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.