org.mortbay.jaas
public class JAASUserPrincipal extends Object implements Principal
Implements the JAAS version of the org.mortbay.http.UserPrincipal interface.
Version: $Id: JAASUserPrincipal.java,v 1.6 2004/07/01 19:12:08 janb Exp $
| Nested Class Summary | |
|---|---|
| static class | JAASUserPrincipal.RoleStack RoleStack
|
| Constructor Summary | |
|---|---|
| JAASUserPrincipal(String name) Constructor. | |
| Method Summary | |
|---|---|
| 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.
|
Parameters: name the name identifying the user
Returns:
Returns:
Returns:
Parameters: roleName role to check
Returns: true or false accordint to the RoleCheckPolicy.
Parameters: roleName
Parameters: policy
Parameters: subject