Class AbstractAuthenticationHandler
- java.lang.Object
-
- edu.vt.middleware.ldap.auth.handler.AbstractAuthenticationHandler
-
- All Implemented Interfaces:
AuthenticationHandler
- Direct Known Subclasses:
BindAuthenticationHandler,CompareAuthenticationHandler
public abstract class AbstractAuthenticationHandler extends java.lang.Object implements AuthenticationHandler
AbstractAuthenticationHandler provides a base implementation for authentication handlers.- Version:
- $Revision: 1330 $
- Author:
- Middleware Services
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthenticatorConfigconfigAuthenticator configuration.protected org.apache.commons.logging.LogloggerLog for this class.
-
Constructor Summary
Constructors Constructor Description AbstractAuthenticationHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidauthenticate(ConnectionHandler ch, AuthenticationCriteria ac)Perform an ldap authentication.abstract AuthenticationHandlernewInstance()Returns a separate instance of this authentication handler.voidsetAuthenticatorConfig(AuthenticatorConfig ac)Sets the authenticator configuration.
-
-
-
Field Detail
-
logger
protected final org.apache.commons.logging.Log logger
Log for this class.
-
config
protected AuthenticatorConfig config
Authenticator configuration.
-
-
Method Detail
-
setAuthenticatorConfig
public void setAuthenticatorConfig(AuthenticatorConfig ac)
Sets the authenticator configuration.- Specified by:
setAuthenticatorConfigin interfaceAuthenticationHandler- Parameters:
ac- authenticator config
-
authenticate
public abstract void authenticate(ConnectionHandler ch, AuthenticationCriteria ac) throws javax.naming.NamingException
Perform an ldap authentication. Implementations should throwAuthenticationExceptionto indicate an authentication failure. The resultingLdapContextcan be retrieved from the connection handler if it is needed.- Specified by:
authenticatein interfaceAuthenticationHandler- Parameters:
ch-ConnectionHandlerto communicate with the LDAPac-AuthenticationCriteriato perform the authentication with- Throws:
javax.naming.NamingException- if an LDAP error occurs
-
newInstance
public abstract AuthenticationHandler newInstance()
Returns a separate instance of this authentication handler.- Specified by:
newInstancein interfaceAuthenticationHandler- Returns:
- authentication handler
-
-