org.ldaptive.auth
Class AbstractCompareAuthenticationHandler

java.lang.Object
  extended by org.ldaptive.auth.AbstractAuthenticationHandler
      extended by org.ldaptive.auth.AbstractCompareAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler
Direct Known Subclasses:
CompareAuthenticationHandler, PooledCompareAuthenticationHandler

public abstract class AbstractCompareAuthenticationHandler
extends AbstractAuthenticationHandler

Provides implementation common to compare authentication handlers.

Version:
$Revision: 3006 $ $Date: 2014-07-02 10:22:50 -0400 (Wed, 02 Jul 2014) $
Author:
Middleware Services

Field Summary
protected static String DEFAULT_SCHEME
          Default password scheme.
 
Fields inherited from class org.ldaptive.auth.AbstractAuthenticationHandler
logger
 
Constructor Summary
AbstractCompareAuthenticationHandler()
           
 
Method Summary
protected  AuthenticationHandlerResponse authenticateInternal(Connection c, AuthenticationCriteria criteria)
          Authenticate on the supplied connection using the supplied criteria.
protected abstract  Connection getConnection()
          Returns a connection that the compare operation should be performed on.
 String getPasswordScheme()
          Returns the password scheme.
 void setPasswordScheme(String s)
          Sets the password scheme.
 
Methods inherited from class org.ldaptive.auth.AbstractAuthenticationHandler
authenticate, getAuthenticationControls, setAuthenticationControls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SCHEME

protected static final String DEFAULT_SCHEME
Default password scheme. Value is "SHA".

See Also:
Constant Field Values
Constructor Detail

AbstractCompareAuthenticationHandler

public AbstractCompareAuthenticationHandler()
Method Detail

getPasswordScheme

public String getPasswordScheme()
Returns the password scheme.

Returns:
password scheme

setPasswordScheme

public void setPasswordScheme(String s)
Sets the password scheme. Must equal a known message digest algorithm.

Parameters:
s - password scheme

authenticateInternal

protected AuthenticationHandlerResponse authenticateInternal(Connection c,
                                                             AuthenticationCriteria criteria)
                                                      throws LdapException
Authenticate on the supplied connection using the supplied criteria.

Specified by:
authenticateInternal in class AbstractAuthenticationHandler
Parameters:
c - to authenticate on
criteria - criteria to authenticate with
Returns:
authentication handler response
Throws:
LdapException - if the authentication fails

getConnection

protected abstract Connection getConnection()
                                     throws LdapException
Returns a connection that the compare operation should be performed on.

Specified by:
getConnection in class AbstractAuthenticationHandler
Returns:
connection
Throws:
LdapException - if an error occurs provisioning the connection


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