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