org.apache.directory.server.core.authn
Class AbstractAuthenticator

java.lang.Object
  extended by org.apache.directory.server.core.authn.AbstractAuthenticator
All Implemented Interfaces:
Authenticator
Direct Known Subclasses:
AnonymousAuthenticator, SimpleAuthenticator, StrongAuthenticator

public abstract class AbstractAuthenticator
extends java.lang.Object
implements Authenticator

Base class for all Authenticators.

Version:
$Rev: 664295 $, $Date: 2008-06-07 09:48:16 +0200 (Sa, 07 Jun 2008) $
Author:
Apache Directory Project

Constructor Summary
protected AbstractAuthenticator(java.lang.String type)
          Creates a new instance.
 
Method Summary
 void destroy()
          Calls doDestroy() method, and clears default properties (factoryConfiguration and configuration).
protected  void doDestroy()
          Implement your deinitialization code here.
protected  void doInit()
          Implement your initialization code here.
 java.lang.String getAuthenticatorType()
          Returns the type of this authenticator (e.g.
 DirectoryService getDirectoryService()
          Returns DirectoryService for this authenticator.
 void init(DirectoryService directoryService)
          Initializes (directoryService and and calls doInit() method.
 void invalidateCache(org.apache.directory.shared.ldap.name.LdapDN bindDn)
          Does nothing leaving it so subclasses can override.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.server.core.authn.Authenticator
authenticate
 

Constructor Detail

AbstractAuthenticator

protected AbstractAuthenticator(java.lang.String type)
Creates a new instance.

Parameters:
type - the type of this authenticator (e.g. 'simple', 'none'...)
Method Detail

getDirectoryService

public DirectoryService getDirectoryService()
Returns DirectoryService for this authenticator.

Returns:
the directory service core

getAuthenticatorType

public java.lang.String getAuthenticatorType()
Description copied from interface: Authenticator
Returns the type of this authenticator (e.g. 'simple', 'none',...).

Specified by:
getAuthenticatorType in interface Authenticator

init

public final void init(DirectoryService directoryService)
                throws java.lang.Exception
Initializes (directoryService and and calls doInit() method. Please put your initialization code into doInit().

Specified by:
init in interface Authenticator
Parameters:
directoryService - the directory core for this authenticator
Throws:
javax.naming.NamingException - if there is a problem starting up the authenticator
java.lang.Exception

doInit

protected void doInit()
Implement your initialization code here.


destroy

public final void destroy()
Calls doDestroy() method, and clears default properties (factoryConfiguration and configuration). Please put your deinitialization code into doDestroy().

Specified by:
destroy in interface Authenticator

doDestroy

protected void doDestroy()
Implement your deinitialization code here.


invalidateCache

public void invalidateCache(org.apache.directory.shared.ldap.name.LdapDN bindDn)
Does nothing leaving it so subclasses can override.

Specified by:
invalidateCache in interface Authenticator
Parameters:
bindDn - the already normalized distinguished name of the bind principal


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.