|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mortbay.jetty.plus.jaas.JAASUserRealm
public class JAASUserRealm
JAASUserRealm
| Field Summary | |
|---|---|
protected java.lang.String |
callbackHandlerClass
|
static java.lang.String |
DEFAULT_ROLE_CLASS_NAME
|
static java.lang.String[] |
DEFAULT_ROLE_CLASS_NAMES
|
protected JAASUserPrincipal |
defaultUser
|
protected java.lang.String |
loginModuleName
|
protected java.lang.String |
realmName
|
protected RoleCheckPolicy |
roleCheckPolicy
|
protected java.lang.String[] |
roleClassNames
|
| Constructor Summary | |
|---|---|
JAASUserRealm()
Constructor. |
|
JAASUserRealm(java.lang.String name)
Constructor. |
|
| Method Summary | |
|---|---|
java.security.Principal |
authenticate(java.lang.String username,
java.lang.Object credentials,
Request request)
Authenticate a user. |
void |
disassociate(java.security.Principal user)
Removes any auth info associated with eg. |
java.lang.String |
getName()
Get the name of the realm. |
java.security.Principal |
getPrincipal(java.lang.String username)
Get the principal for a username. |
java.lang.String[] |
getRoleClassNames()
|
java.security.acl.Group |
getRoles(JAASUserPrincipal principal)
|
boolean |
isUserInRole(java.security.Principal user,
java.lang.String role)
Check if the user is in a role. |
void |
logout(java.security.Principal user)
Logout a previously logged in user. |
java.security.Principal |
popRole(java.security.Principal user)
Pop role from a Principal. |
java.security.Principal |
pushRole(java.security.Principal user,
java.lang.String role)
Temporarily adds a role to a user. |
boolean |
reauthenticate(java.security.Principal user)
Re Authenticate a Principal. |
void |
setCallbackHandlerClass(java.lang.String classname)
|
void |
setLoginModuleName(java.lang.String name)
Set the name to use to index into the config file of LoginModules. |
void |
setName(java.lang.String name)
Set the name of the realm |
void |
setRoleCheckPolicy(RoleCheckPolicy policy)
|
void |
setRoleClassNames(java.lang.String[] classnames)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String DEFAULT_ROLE_CLASS_NAME
public static java.lang.String[] DEFAULT_ROLE_CLASS_NAMES
protected java.lang.String[] roleClassNames
protected java.lang.String callbackHandlerClass
protected java.lang.String realmName
protected java.lang.String loginModuleName
protected RoleCheckPolicy roleCheckPolicy
protected JAASUserPrincipal defaultUser
| Constructor Detail |
|---|
public JAASUserRealm()
public JAASUserRealm(java.lang.String name)
name - the name of the realm| Method Detail |
|---|
public java.lang.String getName()
getName in interface UserRealmpublic void setName(java.lang.String name)
name - a String valuepublic void setLoginModuleName(java.lang.String name)
name - a String valuepublic void setCallbackHandlerClass(java.lang.String classname)
public void setRoleClassNames(java.lang.String[] classnames)
public java.lang.String[] getRoleClassNames()
public void setRoleCheckPolicy(RoleCheckPolicy policy)
public java.security.Principal getPrincipal(java.lang.String username)
UserRealm
getPrincipal in interface UserRealm
public boolean isUserInRole(java.security.Principal user,
java.lang.String role)
UserRealm
isUserInRole in interface UserRealmrole - A role name.
public boolean reauthenticate(java.security.Principal user)
UserRealm
reauthenticate in interface UserRealm
public java.security.Principal authenticate(java.lang.String username,
java.lang.Object credentials,
Request request)
authenticate in interface UserRealmusername - provided by the user at logincredentials - provided by the user at loginrequest - a Request value
public void disassociate(java.security.Principal user)
disassociate in interface UserRealmuser - a UserPrincipal to disassociate
public java.security.Principal pushRole(java.security.Principal user,
java.lang.String role)
pushRole in interface UserRealmuser - the Principal to which to add the rolerole - the role name
public java.security.Principal popRole(java.security.Principal user)
UserRealm
popRole in interface UserRealmuser - A UserPrincipal previously returned from pushRole
public java.security.acl.Group getRoles(JAASUserPrincipal principal)
public void logout(java.security.Principal user)
logout in interface UserRealmuser - an Principal value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||