All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.vt.middleware.ldap.auth.handler.AuthenticationHandler Maven / Gradle / Ivy

There is a newer version: 3.3.9
Show newest version
/*
  $Id: AuthenticationHandler.java 1330 2010-05-23 22:10:53Z dfisher $

  Copyright (C) 2003-2010 Virginia Tech.
  All rights reserved.

  SEE LICENSE FOR MORE INFORMATION

  Author:  Middleware Services
  Email:   [email protected]
  Version: $Revision: 1330 $
  Updated: $Date: 2010-05-23 18:10:53 -0400 (Sun, 23 May 2010) $
*/
package edu.vt.middleware.ldap.auth.handler;

import javax.naming.NamingException;
import edu.vt.middleware.ldap.auth.AuthenticatorConfig;
import edu.vt.middleware.ldap.handler.ConnectionHandler;

/**
 * AuthenticationHandler provides an interface for LDAP
 * authentication implementations.
 *
 * @author  Middleware Services
 * @version  $Revision: 1330 $
 */
public interface AuthenticationHandler
{


  /**
   * Sets the authenticator configuration.
   *
   * @param  ac  authenticator config
   */
  void setAuthenticatorConfig(AuthenticatorConfig ac);


  /**
   * 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.
   *
   * @param  ch  ConnectionHandler to communicate with the LDAP
   * @param  ac  AuthenticationCriteria to perform the
   * authentication with
   *
   * @throws  AuthenticationException  if authentication fails
   * @throws  NamingException  if an LDAP error occurs
   */
  void authenticate(ConnectionHandler ch, AuthenticationCriteria ac)
    throws NamingException;


  /**
   * Returns a separate instance of this authentication handler.
   *
   * @return  authentication handler
   */
  AuthenticationHandler newInstance();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy