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 AuthenticatorConfig
config
Authenticator configuration.protected org.apache.commons.logging.Log
logger
Log 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 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.
-
-
-
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:
setAuthenticatorConfig
in interfaceAuthenticationHandler
- Parameters:
ac
- authenticator config
-
authenticate
public abstract void authenticate(ConnectionHandler ch, AuthenticationCriteria ac) throws javax.naming.NamingException
Perform an ldap authentication. Implementations should throwAuthenticationException
to indicate an authentication failure. The resultingLdapContext
can be retrieved from the connection handler if it is needed.- Specified by:
authenticate
in interfaceAuthenticationHandler
- Parameters:
ch
-ConnectionHandler
to communicate with the LDAPac
-AuthenticationCriteria
to 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:
newInstance
in interfaceAuthenticationHandler
- Returns:
- authentication handler
-
-