|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ow2.jonas.web.jetty6.security.Realm
public class Realm
Realm used by Jetty 6 service.
Constructor Summary | |
---|---|
Realm()
Default Constructor. |
|
Realm(String name)
Default Constructor. |
Method Summary | |
---|---|
protected void |
addUser(String username,
JettyPrincipal principal)
Add a user to the current map. |
Principal |
authenticate(String username,
Object credentials,
org.mortbay.jetty.Request request)
Authenticate a user with a specific username and credentials. |
void |
disassociate(Principal user)
Disassociate a user. |
String |
getName()
|
Principal |
getPrincipal(String username)
Gets the principal with the given username. |
protected Map<String,JettyPrincipal> |
getUsers()
|
boolean |
isUserInRole(Principal user,
String roleName)
Check if a user is in a role. |
void |
logout(Principal user)
Log out a specific user. |
Principal |
popRole(Principal user)
Pop a role to a user (not implemented). |
Principal |
pushRole(Principal user,
String role)
Push a role to a user (not implemented). |
boolean |
reauthenticate(Principal user)
Check if the specific user is authenticated. |
protected void |
removeUser(String username)
Remove a specific user. |
protected void |
setName(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 |
---|
public Realm()
public Realm(String name)
name
- of the realmMethod Detail |
---|
public Principal authenticate(String username, Object credentials, org.mortbay.jetty.Request request)
authenticate
in interface org.mortbay.jetty.security.UserRealm
username
- name of the usercredentials
- credential of the userrequest
- httprequest
protected Map<String,JettyPrincipal> getUsers()
protected void addUser(String username, JettyPrincipal principal)
username
- name of the userprincipal
- objectprotected void removeUser(String username)
username
- user to removepublic boolean isUserInRole(Principal user, String roleName)
isUserInRole
in interface org.mortbay.jetty.security.UserRealm
user
- The user, which must be from this realmroleName
- the role to test for the given user
public Principal getPrincipal(String username)
getPrincipal
in interface org.mortbay.jetty.security.UserRealm
username
- the given username
public void disassociate(Principal user)
disassociate
in interface org.mortbay.jetty.security.UserRealm
user
- the given userpublic Principal pushRole(Principal user, String role)
pushRole
in interface org.mortbay.jetty.security.UserRealm
user
- the given userrole
- the role to push
public Principal popRole(Principal user)
popRole
in interface org.mortbay.jetty.security.UserRealm
user
- the given user
public void logout(Principal user)
logout
in interface org.mortbay.jetty.security.UserRealm
user
- the user to logoutpublic boolean reauthenticate(Principal user)
reauthenticate
in interface org.mortbay.jetty.security.UserRealm
user
- the user to reauthenticate
protected void setName(String name)
name
- The name to set.public String getName()
getName
in interface org.mortbay.jetty.security.UserRealm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |