java.lang.Object
org.acegisecurity.adapters.jetty.JettyAcegiUserRealm
- All Implemented Interfaces:
- org.mortbay.http.UserRealm
- public final class JettyAcegiUserRealm
- extends java.lang.Object
- implements org.mortbay.http.UserRealm
Adapter to enable Jetty to authenticate via the Acegi Security System for
Spring.
Returns a JettyAcegiUserToken to Jetty's authentication system,
which is subsequently available via
HttpServletRequest.getUserPrincipal().
- Version:
- $Id: JettyAcegiUserRealm.java,v 1.4 2005/11/17 00:56:28 benalex Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final org.apache.commons.logging.Log logger
authenticationManager
private org.acegisecurity.AuthenticationManager authenticationManager
key
private java.lang.String key
realm
private java.lang.String realm
JettyAcegiUserRealm
public JettyAcegiUserRealm(java.lang.String realm,
java.lang.String providerKey,
java.lang.String appContextLocation)
- Construct a
SpringUserRealm.
JettyAcegiUserRealm
protected JettyAcegiUserRealm()
getAuthenticationManager
public org.acegisecurity.AuthenticationManager getAuthenticationManager()
getName
public java.lang.String getName()
- Accesses the realm name.
- Specified by:
getName in interface org.mortbay.http.UserRealm
authenticate
public org.mortbay.http.UserPrincipal authenticate(java.lang.String username,
java.lang.Object password,
org.mortbay.http.HttpRequest httpRequest)
- Description copied from interface:
org.mortbay.http.UserRealm
- Authenticate a users credentials.
Implementations of this method may adorn the calling context to
assoicate it with the authenticated principal (eg ThreadLocals). If
such context associations are made, they should be considered valid
until a UserRealm.deAuthenticate(UserPrincipal) call is made for this
UserPrincipal.
- Specified by:
authenticate in interface org.mortbay.http.UserRealm
disassociate
public void disassociate(org.mortbay.http.UserPrincipal userPrincipal)
logout
public void logout(org.mortbay.http.UserPrincipal arg0)
popRole
public org.mortbay.http.UserPrincipal popRole(org.mortbay.http.UserPrincipal userPrincipal)
pushRole
public org.mortbay.http.UserPrincipal pushRole(org.mortbay.http.UserPrincipal userPrincipal,
java.lang.String role)