org.apache.directory.server.core.authn
Interface Authenticator

All Known Implementing Classes:
AbstractAuthenticator, AnonymousAuthenticator, SimpleAuthenticator

public interface Authenticator

Authenticates users who access PartitionNexus.

Authenticators are registered to and configured by AuthenticationService interceptor.

AuthenticationService authenticates users by calling #authenticate(ServerContext), and then Authenticator checks JNDI Context environment properties (Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS) of current Context.

Version:
$Rev: 434579 $
Author:
Apache Directory Project
See Also:
AbstractAuthenticator

Method Summary
 LdapPrincipal authenticate(org.apache.directory.shared.ldap.name.LdapDN bindDn, ServerContext ctx)
          Performs authentication and returns the principal if succeeded.
 void destroy()
          Called by AuthenticationService to indicate that this authenticator is being removed from service.
 java.lang.String getAuthenticatorType()
          Returns the type of this authenticator (e.g.
 void init(DirectoryServiceConfiguration factoryCfg, AuthenticatorConfiguration cfg)
          Called by AuthenticationService to indicate that this authenticator is being placed into service.
 void invalidateCache(org.apache.directory.shared.ldap.name.LdapDN bindDn)
          Callback used to respond to password changes by invalidating a password cache if implemented.
 

Method Detail

getAuthenticatorType

java.lang.String getAuthenticatorType()
Returns the type of this authenticator (e.g. 'simple', 'none',...).


init

void init(DirectoryServiceConfiguration factoryCfg,
          AuthenticatorConfiguration cfg)
          throws javax.naming.NamingException
Called by AuthenticationService to indicate that this authenticator is being placed into service.

Throws:
javax.naming.NamingException

destroy

void destroy()
Called by AuthenticationService to indicate that this authenticator is being removed from service.


invalidateCache

void invalidateCache(org.apache.directory.shared.ldap.name.LdapDN bindDn)
Callback used to respond to password changes by invalidating a password cache if implemented. This is an additional feature of an authenticator which need not be implemented: empty implementation is sufficient. This is called on every del, modify, and modifyRdn operation.

Parameters:
bindDn - the already normalized distinguished name of the bind principal

authenticate

LdapPrincipal authenticate(org.apache.directory.shared.ldap.name.LdapDN bindDn,
                           ServerContext ctx)
                           throws javax.naming.NamingException
Performs authentication and returns the principal if succeeded.

Throws:
javax.naming.NamingException


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