Modifier and Type | Class and Description |
---|---|
static class |
JAASUserPrincipal.RoleStack
RoleStack
|
Constructor and Description |
---|
JAASUserPrincipal(JAASUserRealm realm,
String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
disassociate()
Clean out any pushed roles that haven't been popped
|
protected LoginContext |
getLoginContext() |
String |
getName()
Get the name identifying the user
|
JAASUserRealm |
getRealm() |
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.
|
protected void |
setLoginContext(LoginContext loginContext) |
void |
setRoleCheckPolicy(RoleCheckPolicy policy)
Set the type of checking for isUserInRole
|
protected void |
setSubject(Subject subject)
Sets the JAAS subject for this user.
|
String |
toString() |
public JAASUserPrincipal(JAASUserRealm realm, String name)
name
- the name identifying the userpublic JAASUserRealm getRealm()
public boolean isUserInRole(String roleName)
roleName
- role to checkpublic Group getRoles()
Group
of Principals
representing the roles this user holdspublic void setRoleCheckPolicy(RoleCheckPolicy policy)
policy
- public void pushRole(String roleName)
roleName
- public void popRole()
public void disassociate()
public String getName()
protected void setSubject(Subject subject)
subject
- public Subject getSubject()
protected void setLoginContext(LoginContext loginContext)
protected LoginContext getLoginContext()
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.