|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ldap.server.authn.AbstractAuthenticator
Base class for all Authenticators.
Constructor Summary | |
protected |
AbstractAuthenticator(java.lang.String type)
Creates a new instance. |
Method Summary | |
abstract LdapPrincipal |
authenticate(ServerContext ctx)
Performs authentication and returns the principal if succeeded. |
protected static LdapPrincipal |
createLdapPrincipal(java.lang.String name)
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. |
ContextFactoryConfiguration |
getFactoryConfiguration()
Returns ContextFactoryConfiguration of InitialContextFactory
which initialized this authenticator. |
void |
init(ContextFactoryConfiguration factoryCfg,
AuthenticatorConfiguration cfg)
Initializes default properties (factoryConfiguration and configuration, and calls doInit() method. |
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 ContextFactoryConfiguration getFactoryConfiguration()
ContextFactoryConfiguration
of InitialContextFactory
which initialized this authenticator.
public AuthenticatorConfiguration getConfiguration()
public java.lang.String getAuthenticatorType()
Authenticator
getAuthenticatorType
in interface Authenticator
public final void init(ContextFactoryConfiguration 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(ServerContext ctx) throws javax.naming.NamingException
Authenticator
authenticate
in interface Authenticator
javax.naming.NamingException
protected static LdapPrincipal createLdapPrincipal(java.lang.String name) throws javax.naming.NamingException
LdapPrincipal
instance whose value is the specified
name.
name
- the distinguished name of the X.500 principal
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 |