|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mortbay.jetty.plus.jaas.JAASUserPrincipal
public class JAASUserPrincipal
JAASUserPrincipal
Implements the JAAS version of the org.mortbay.http.UserPrincipal interface.
| Nested Class Summary | |
|---|---|
static class |
JAASUserPrincipal.RoleStack
RoleStack |
| Constructor Summary | |
|---|---|
JAASUserPrincipal(JAASUserRealm realm,
String name)
Constructor. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.security.Principal |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public JAASUserPrincipal(JAASUserRealm realm,
String name)
name - the name identifying the user| Method Detail |
|---|
public JAASUserRealm getRealm()
public boolean isUserInRole(String roleName)
roleName - role to check
public 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()
getName in interface Principalprotected void setSubject(Subject subject)
subject - public Subject getSubject()
protected void setLoginContext(LoginContext loginContext)
protected LoginContext getLoginContext()
public String toString()
toString in interface PrincipaltoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||