org.ldaptive.auth
Class BindAuthenticationHandler

java.lang.Object
  extended by org.ldaptive.auth.AbstractAuthenticationHandler
      extended by org.ldaptive.auth.AbstractBindAuthenticationHandler
          extended by org.ldaptive.auth.BindAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler, ConnectionFactoryManager

public class BindAuthenticationHandler
extends AbstractBindAuthenticationHandler
implements ConnectionFactoryManager

Provides an LDAP authentication implementation that leverages the LDAP bind operation.

Version:
$Revision: 3120 $ $Date: 2015-10-01 11:50:02 -0400 (Thu, 01 Oct 2015) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.auth.AbstractAuthenticationHandler
logger
 
Constructor Summary
BindAuthenticationHandler()
          Default constructor.
BindAuthenticationHandler(ConnectionFactory cf)
          Creates a new bind authentication handler.
 
Method Summary
protected  AuthenticationHandlerResponse authenticateInternal(Connection c, AuthenticationCriteria criteria)
          Authenticate on the supplied connection using the supplied criteria.
protected  Connection getConnection()
          Returns a connection that the authentication operation should be performed on.
 ConnectionFactory getConnectionFactory()
          Returns the connection factory.
 void setConnectionFactory(ConnectionFactory cf)
          Sets the connection factory.
 String toString()
          
 
Methods inherited from class org.ldaptive.auth.AbstractBindAuthenticationHandler
getAuthenticationSaslConfig, setAuthenticationSaslConfig
 
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, wait, wait, wait
 

Constructor Detail

BindAuthenticationHandler

public BindAuthenticationHandler()
Default constructor.


BindAuthenticationHandler

public BindAuthenticationHandler(ConnectionFactory cf)
Creates a new bind authentication handler.

Parameters:
cf - connection factory
Method Detail

getConnectionFactory

public ConnectionFactory getConnectionFactory()
Returns the connection factory.

Specified by:
getConnectionFactory in interface ConnectionFactoryManager
Returns:
connection factory

setConnectionFactory

public void setConnectionFactory(ConnectionFactory cf)
Sets the connection factory.

Specified by:
setConnectionFactory in interface ConnectionFactoryManager
Parameters:
cf - connection factory

getConnection

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

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

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

toString

public String toString()

Overrides:
toString in class Object


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