org.acegisecurity.adapters.jetty
Class JettyAcegiUserRealm

java.lang.Object
  extended by org.acegisecurity.adapters.jetty.JettyAcegiUserRealm
All Implemented Interfaces:
org.mortbay.http.UserRealm

public final class JettyAcegiUserRealm
extends 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 1496 2006-05-23 13:38:33Z benalex $
Author:
Ben Alex

Constructor Summary
protected JettyAcegiUserRealm()
           
  JettyAcegiUserRealm(String realm, String providerKey, String appContextLocation)
          Construct a SpringUserRealm.
 
Method Summary
 org.mortbay.http.UserPrincipal authenticate(String username, Object password, org.mortbay.http.HttpRequest httpRequest)
           
 void disassociate(org.mortbay.http.UserPrincipal userPrincipal)
           
 org.acegisecurity.AuthenticationManager getAuthenticationManager()
           
 String getName()
          Accesses the realm name.
 void logout(org.mortbay.http.UserPrincipal arg0)
           
 org.mortbay.http.UserPrincipal popRole(org.mortbay.http.UserPrincipal userPrincipal)
           
 org.mortbay.http.UserPrincipal pushRole(org.mortbay.http.UserPrincipal userPrincipal, String role)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JettyAcegiUserRealm

public JettyAcegiUserRealm(String realm,
                           String providerKey,
                           String appContextLocation)
Construct a SpringUserRealm.

Parameters:
realm - the name of the authentication realm (within Jetty)
providerKey - a password to sign all authentication objects
appContextLocation - the classpath location of the bean context XML file
Throws:
IllegalArgumentException - DOCUMENT ME!

JettyAcegiUserRealm

protected JettyAcegiUserRealm()
Method Detail

authenticate

public org.mortbay.http.UserPrincipal authenticate(String username,
                                                   Object password,
                                                   org.mortbay.http.HttpRequest httpRequest)
Specified by:
authenticate in interface org.mortbay.http.UserRealm

disassociate

public void disassociate(org.mortbay.http.UserPrincipal userPrincipal)
Specified by:
disassociate in interface org.mortbay.http.UserRealm

getAuthenticationManager

public org.acegisecurity.AuthenticationManager getAuthenticationManager()

getName

public String getName()
Accesses the realm name.

Specified by:
getName in interface org.mortbay.http.UserRealm
Returns:
the name of the realm as defined when SpringUserRealm was created

logout

public void logout(org.mortbay.http.UserPrincipal arg0)
Specified by:
logout in interface org.mortbay.http.UserRealm

popRole

public org.mortbay.http.UserPrincipal popRole(org.mortbay.http.UserPrincipal userPrincipal)
Specified by:
popRole in interface org.mortbay.http.UserRealm

pushRole

public org.mortbay.http.UserPrincipal pushRole(org.mortbay.http.UserPrincipal userPrincipal,
                                               String role)
Specified by:
pushRole in interface org.mortbay.http.UserRealm


Copyright © 2004-2006 Acegi Technology Pty Limited. All Rights Reserved.