edu.vt.middleware.ldap.auth.handler
Class AbstractAuthenticationHandler

java.lang.Object
  extended by edu.vt.middleware.ldap.auth.handler.AbstractAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler
Direct Known Subclasses:
BindAuthenticationHandler, CompareAuthenticationHandler

public abstract class AbstractAuthenticationHandler
extends Object
implements AuthenticationHandler

AbstractAuthenticationHandler provides a base implementation for authentication handlers.

Version:
$Revision: 1330 $
Author:
Middleware Services

Field Summary
protected  AuthenticatorConfig config
          Authenticator configuration.
protected  org.apache.commons.logging.Log logger
          Log for this class.
 
Constructor Summary
AbstractAuthenticationHandler()
           
 
Method Summary
abstract  void authenticate(ConnectionHandler ch, AuthenticationCriteria ac)
          Perform an ldap authentication.
abstract  AuthenticationHandler newInstance()
          Returns a separate instance of this authentication handler.
 void setAuthenticatorConfig(AuthenticatorConfig ac)
          Sets the authenticator configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Log for this class.


config

protected AuthenticatorConfig config
Authenticator configuration.

Constructor Detail

AbstractAuthenticationHandler

public AbstractAuthenticationHandler()
Method Detail

setAuthenticatorConfig

public void setAuthenticatorConfig(AuthenticatorConfig ac)
Sets the authenticator configuration.

Specified by:
setAuthenticatorConfig in interface AuthenticationHandler
Parameters:
ac - authenticator config

authenticate

public abstract void authenticate(ConnectionHandler ch,
                                  AuthenticationCriteria ac)
                           throws NamingException
Perform an ldap authentication. Implementations should throw AuthenticationException to indicate an authentication failure. The resulting LdapContext can be retrieved from the connection handler if it is needed.

Specified by:
authenticate in interface AuthenticationHandler
Parameters:
ch - ConnectionHandler to communicate with the LDAP
ac - AuthenticationCriteria to perform the authentication with
Throws:
NamingException - if an LDAP error occurs

newInstance

public abstract AuthenticationHandler newInstance()
Returns a separate instance of this authentication handler.

Specified by:
newInstance in interface AuthenticationHandler
Returns:
authentication handler


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.