org.apache.lenya.ac.impl
Class UserAuthenticator

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.ac.impl.UserAuthenticator
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, Authenticator

public class UserAuthenticator
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements Authenticator

User authenticator.

Version:
$Id: UserAuthenticator.java 473842 2006-11-12 01:15:20Z gregor $

Field Summary
 
Fields inherited from interface org.apache.lenya.ac.Authenticator
ROLE
 
Constructor Summary
UserAuthenticator()
           
 
Method Summary
 boolean authenticate(AccreditableManager accreditableManager, org.apache.cocoon.environment.Request request)
          Authenticates a request.
protected  boolean authenticate(AccreditableManager accreditableManager, java.lang.String username, java.lang.String password, Identity identity)
          Authenticates a user with a given username and password.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserAuthenticator

public UserAuthenticator()
Method Detail

authenticate

public boolean authenticate(AccreditableManager accreditableManager,
                            org.apache.cocoon.environment.Request request)
                     throws AccessControlException
Description copied from interface: Authenticator
Authenticates a request.

Specified by:
authenticate in interface Authenticator
Parameters:
accreditableManager - The accreditable manager to use.
request - The request.
Returns:
true if the request is authenticated, false otherwise.
Throws:
AccessControlException - when something went wrong.
See Also:
Authenticator.authenticate(org.apache.lenya.ac.AccreditableManager, org.apache.cocoon.environment.Request)

authenticate

protected boolean authenticate(AccreditableManager accreditableManager,
                               java.lang.String username,
                               java.lang.String password,
                               Identity identity)
                        throws AccessControlException
Authenticates a user with a given username and password. When the authentication is successful, the user is added to the identity.

Parameters:
accreditableManager - The accreditable manager.
username - The username.
password - The password.
identity - The identity to add the user to.
Returns:
true if the user was authenticated, false otherwise.
Throws:
AccessControlException - when something went wrong.


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.