org.mortbay.jaas
public class JAASUserRealm extends Object implements UserRealm
Nested Class Summary | |
---|---|
protected class | JAASUserRealm.UserInfo
UserInfo
Information cached for an authenticated user.
|
Field Summary | |
---|---|
protected String | callbackHandlerClass |
protected String | loginModuleName |
protected String | realmName |
protected RoleCheckPolicy | roleCheckPolicy |
protected HashMap | userMap |
Constructor Summary | |
---|---|
JAASUserRealm()
Constructor.
| |
JAASUserRealm(String name)
Constructor.
|
Method Summary | |
---|---|
Principal | authenticate(String username, Object credentials, HttpRequest request)
Authenticate a user.
|
void | disassociate(Principal user)
Removes any auth info associated with eg. the thread.
|
String | getName()
Get the name of the realm.
|
Principal | getPrincipal(String username) |
boolean | isUserInRole(Principal user, String role) |
void | logout(Principal user)
Logout a previously logged in user.
|
Principal | popRole(Principal user) |
Principal | pushRole(Principal user, String role)
Temporarily adds a role to a user.
|
boolean | reauthenticate(Principal user) |
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) |
Parameters: name the name of the realm
Parameters: username provided by the user at login credentials provided by the user at login request a HttpRequest
value
Returns: authenticated JAASUserPrincipal or null if authenticated failed
Parameters: user a UserPrincipal to disassociate
Returns: name or null if not set.
Parameters: user an Principal
value
Parameters: user the Principal to which to add the role role the role name
Returns: the Principal with the role added
Parameters: name a String
value
Parameters: name a String
value