| Modifier and Type | Class and Description |
|---|---|
protected class |
JAASUserRealm.UserInfo
UserInfo
Information cached for an authenticated user.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
callbackHandlerClass |
protected java.lang.String |
loginModuleName |
protected java.lang.String |
realmName |
protected RoleCheckPolicy |
roleCheckPolicy |
protected java.util.HashMap |
userMap |
| Constructor and Description |
|---|
JAASUserRealm()
Constructor.
|
JAASUserRealm(java.lang.String name)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.security.Principal |
authenticate(java.lang.String username,
java.lang.Object credentials,
HttpRequest 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.
|
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) |
protected java.lang.String callbackHandlerClass
protected java.lang.String realmName
protected java.lang.String loginModuleName
protected java.util.HashMap userMap
protected RoleCheckPolicy roleCheckPolicy
public JAASUserRealm()
public JAASUserRealm(java.lang.String name)
name - the name of the realmpublic java.lang.String getName()
public 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 setRoleCheckPolicy(RoleCheckPolicy policy)
public java.security.Principal getPrincipal(java.lang.String username)
UserRealmgetPrincipal in interface UserRealmpublic boolean isUserInRole(java.security.Principal user,
java.lang.String role)
UserRealmisUserInRole in interface UserRealmrole - A role name.public boolean reauthenticate(java.security.Principal user)
UserRealmreauthenticate in interface UserRealmpublic java.security.Principal authenticate(java.lang.String username,
java.lang.Object credentials,
HttpRequest request)
authenticate in interface UserRealmusername - provided by the user at logincredentials - provided by the user at loginrequest - a HttpRequest valuepublic void disassociate(java.security.Principal user)
disassociate in interface UserRealmuser - a UserPrincipal to disassociatepublic java.security.Principal pushRole(java.security.Principal user,
java.lang.String role)
public java.security.Principal popRole(java.security.Principal user)
UserRealmpublic void logout(java.security.Principal user)
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.