|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.authn.AbstractAuthenticator
Base class for all Authenticators.
Constructor Summary | |
protected |
AbstractAuthenticator(java.lang.String type)
Creates a new instance. |
Method Summary | |
abstract LdapPrincipal |
authenticate(LdapDN bindDn,
ServerContext ctx)
Performs authentication and returns the principal if succeeded. |
protected static LdapPrincipal |
createLdapPrincipal(java.lang.String name,
AuthenticationLevel authenticationLeve)
Returns a new LdapPrincipal instance whose value is the specified
name. |
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. |
AuthenticatorConfiguration |
getConfiguration()
Returns the configuration of this authenticator. |
DirectoryServiceConfiguration |
getFactoryConfiguration()
Returns DirectoryServiceConfiguration of InitialContextFactory
which initialized this authenticator. |
void |
init(DirectoryServiceConfiguration factoryCfg,
AuthenticatorConfiguration cfg)
Initializes default properties (factoryConfiguration and configuration, and calls doInit() method. |
void |
invalidateCache(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 |
Constructor Detail |
protected AbstractAuthenticator(java.lang.String type)
type
- the type of this authenticator (e.g. 'simple', 'none'...)Method Detail |
public DirectoryServiceConfiguration getFactoryConfiguration()
DirectoryServiceConfiguration
of InitialContextFactory
which initialized this authenticator.
public AuthenticatorConfiguration getConfiguration()
public java.lang.String getAuthenticatorType()
Authenticator
getAuthenticatorType
in interface Authenticator
public final void init(DirectoryServiceConfiguration factoryCfg, AuthenticatorConfiguration cfg) throws javax.naming.NamingException
doInit()
method.
Please put your initialization code into doInit()
.
init
in interface Authenticator
javax.naming.NamingException
protected void doInit() throws javax.naming.NamingException
javax.naming.NamingException
public final void destroy()
doDestroy()
method, and clears default properties
(factoryConfiguration and configuration).
Please put your deinitialization code into doDestroy()
.
destroy
in interface Authenticator
protected void doDestroy()
public abstract LdapPrincipal authenticate(LdapDN bindDn, ServerContext ctx) throws javax.naming.NamingException
Authenticator
authenticate
in interface Authenticator
javax.naming.NamingException
public void invalidateCache(LdapDN bindDn)
invalidateCache
in interface Authenticator
bindDn
- the already normalized distinguished name of the bind principalprotected static LdapPrincipal createLdapPrincipal(java.lang.String name, AuthenticationLevel authenticationLeve) throws javax.naming.NamingException
LdapPrincipal
instance whose value is the specified
name.
name
- the distinguished name of the X.500 principalauthenticationLeve
-
javax.naming.NamingException
- if there is a problem parsing name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |