|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.jonas.security.realm.web.jetty50.Standard
public class Standard
Implementation of a Realm. Use any JOnAS realm by specifying the resource name
Constructor Summary | |
---|---|
protected |
Standard()
Default Constructor |
|
Standard(java.lang.String resourceName)
Constructor |
|
Standard(java.lang.String name,
java.lang.String resourceName)
Constructor |
Method Summary | |
---|---|
protected void |
addUser(java.lang.String username,
java.security.Principal principal)
Add a user to the current map |
java.security.Principal |
authenticate(java.lang.String username,
java.lang.Object credentials,
org.mortbay.http.HttpRequest request)
Authenticate a user with a specific username and credentials |
void |
disassociate(java.security.Principal user)
Disassociate a user Not implemented |
protected static org.objectweb.util.monolog.api.Logger |
getLogger()
|
java.lang.String |
getName()
|
java.security.Principal |
getPrincipal(java.lang.String username)
Gets the principal with the given username |
protected java.util.Map |
getUsers()
|
boolean |
isAuthenticated(java.security.Principal user)
Check if a user is authenticated |
boolean |
isUserInRole(java.security.Principal user,
java.lang.String roleName)
Check if a user is in a role. |
void |
logout(java.security.Principal user)
Log out a specific user |
java.security.Principal |
popRole(java.security.Principal user)
Pop a role to a user Not implemented |
java.security.Principal |
pushRole(java.security.Principal user,
java.lang.String role)
Push a role to a user Not implemented |
boolean |
reauthenticate(java.security.Principal user)
Check if the specific user is authenticated |
protected void |
removeUser(java.lang.String username)
Remove a specific user |
protected void |
setName(java.lang.String name)
Sets the name of the realm |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Standard()
public Standard(java.lang.String resourceName) throws java.lang.Exception
resourceName
- name of the resource to use
java.lang.Exception
- if the resource can't be retrievedpublic Standard(java.lang.String name, java.lang.String resourceName) throws java.lang.Exception
name
- name of the realmresourceName
- name of the resource to use
java.lang.Exception
- if the resource can't be retrievedMethod Detail |
---|
public java.lang.String getName()
getName
in interface org.mortbay.http.UserRealm
public java.security.Principal authenticate(java.lang.String username, java.lang.Object credentials, org.mortbay.http.HttpRequest request)
authenticate
in interface org.mortbay.http.UserRealm
username
- name of the usercredentials
- credential of the userrequest
- httprequest
public boolean isUserInRole(java.security.Principal user, java.lang.String roleName)
isUserInRole
in interface org.mortbay.http.UserRealm
user
- The user, which must be from this realmroleName
- the role to test for the given user
public boolean isAuthenticated(java.security.Principal user)
user
- The user, which must be from this realm
public java.security.Principal getPrincipal(java.lang.String username)
getPrincipal
in interface org.mortbay.http.UserRealm
username
- the given username
public void disassociate(java.security.Principal user)
disassociate
in interface org.mortbay.http.UserRealm
user
- the given userpublic java.security.Principal pushRole(java.security.Principal user, java.lang.String role)
pushRole
in interface org.mortbay.http.UserRealm
user
- the given userrole
- the role to push
public java.security.Principal popRole(java.security.Principal user)
popRole
in interface org.mortbay.http.UserRealm
user
- the given user
public void logout(java.security.Principal user)
logout
in interface org.mortbay.http.UserRealm
user
- the user to logoutpublic boolean reauthenticate(java.security.Principal user)
reauthenticate
in interface org.mortbay.http.UserRealm
user
- the user to reauthenticate
protected static org.objectweb.util.monolog.api.Logger getLogger()
protected java.util.Map getUsers()
protected void removeUser(java.lang.String username)
username
- user to removeprotected void addUser(java.lang.String username, java.security.Principal principal)
username
- name of the userprincipal
- objectprotected void setName(java.lang.String name)
name
- The name to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |