|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nim.NiMKernelService
com.nitido.nim.AuthenticationService
com.nitido.nimx.services.authentication.dirpool.AuthenticationServiceImpl
public class AuthenticationServiceImpl
This implementation of the AuthenticaitonService utilizes the DirPoolService to authenticate against the backend directory server.
This implementation of AuthenticationService requires the following settings:
For each credential type that this AuthenticationService support, you must also provide the following settings, (where <CredType> is the credential type name):
Field Summary | |
---|---|
protected java.util.HashMap |
_credMapSettingHash
|
protected java.lang.String |
_readPoolName
|
protected int |
_sleepForChangePwd
|
protected java.lang.String |
_writePoolName
|
static java.lang.String |
CONF_KEY_PREFIX_ALWAYS_GOOD
Configuration key prefix for the "always good" boolean flag for a credential type. |
static java.lang.String |
CONF_KEY_PREFIX_DN_POSTFIX
Configuration key prefix for the DN postfix to be generated from the credential. |
static java.lang.String |
CONF_KEY_PREFIX_DN_PREFIX
Configuration key prefix for the DN prefix to be generated from the credential. |
static java.lang.String |
CONF_KEY_PREFIX_PASSWORD_MAP
Configuration key prefix for the password mapping to be used for the specified credential. |
static java.lang.String |
CONF_KEY_READ_POOL
Constant for the configuration key for the directory pool name for read access. |
static java.lang.String |
CONF_KEY_SLEEP_CHANGE_PWD
Constant for the configuration key that specifies the time to sleep after changing the password. |
static java.lang.String |
CONF_KEY_WRITE_POOL
Constant for the configuration key for the directory pool name for write access. |
Fields inherited from interface com.nitido.nim.CredentialConstants |
---|
CRED_ADMIN, CRED_CONTAINER, CRED_HELPDESK, CRED_SYSTEM, CRED_USER, KEY_PASSWORD |
Constructor Summary | |
---|---|
AuthenticationServiceImpl(NiMKernelServiceVisa visa)
This class constructor is used by NiMKernel to instantiate a new directory AuthenticationService. |
Method Summary | |
---|---|
protected Credential |
authenticateImpl(Credential cred)
This method is used to authenticate the given credential against a directory server. |
void |
changeAuthenticationCredential(Credential oldCred,
Credential newCred)
This method is used to change the identifying credentials on an entity. |
protected Directory |
connectForRead(java.lang.String dn,
java.lang.String pwd)
This method returns a connected directory object to the backend server obtained from the read access directory pool. |
protected Directory |
connectForWrite(java.lang.String dn,
java.lang.String pwd)
This method returns a connected directory object to the backend server obtained from the write access directory pool. |
protected void |
init(NiMKernel kernel,
ConfigurationService confService)
This method is called by the NiMKernel to initialize the AuthenticationService. |
protected void |
postAuthenticate(Directory dir,
Credential inCred,
java.lang.String dn)
This method performs additional check on an entry's user profile after binding to the backend LDAP server with the credential sucessfully. |
Methods inherited from class com.nitido.nim.AuthenticationService |
---|
authenticate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONF_KEY_READ_POOL
public static final java.lang.String CONF_KEY_WRITE_POOL
public static final java.lang.String CONF_KEY_SLEEP_CHANGE_PWD
public static final java.lang.String CONF_KEY_PREFIX_DN_PREFIX
public static final java.lang.String CONF_KEY_PREFIX_DN_POSTFIX
public static final java.lang.String CONF_KEY_PREFIX_PASSWORD_MAP
public static final java.lang.String CONF_KEY_PREFIX_ALWAYS_GOOD
protected final java.util.HashMap _credMapSettingHash
protected java.lang.String _readPoolName
protected java.lang.String _writePoolName
protected int _sleepForChangePwd
Constructor Detail |
---|
public AuthenticationServiceImpl(NiMKernelServiceVisa visa)
visa
- Reference to the NiMKernelServiceVisa object required to
instantiate the service. This parameter is required to
ensure that only the NiMkernel can instantiate a reference
to this service.Method Detail |
---|
protected void init(NiMKernel kernel, ConfigurationService confService) throws InitializationFailedException, NiMException
init
in class AuthenticationService
kernel
- Reference to the Kernel that instantiated and initialized
this service.confService
- Reference to the ConfigurationService.
The ConfigurationService must provide all of the following
settings in order to initialize this service successfully.
The detail of the required configuration can be found in the
class description JavaDoc of this object.
InitializationFailedException
- If unable to initialize the kernel service.
NiMException
- If service initialization can not be done due to failure in
establish a connection to the back-end service.protected Credential authenticateImpl(Credential cred) throws AuthenticationFailedException, IllegalCredentialException, NiMException
authenticateImpl
in class AuthenticationService
cred
- The credential to authenticate against the directory
IllegalCredentialException
- If the credential is invalid or the configuration settings do
not support the given entity type.
AuthenticationFailedException
- If unable to authenticate the given credential because of
incorrect user id/password combination.
NiMException
- If unable to establish connection to the directory server.protected void postAuthenticate(Directory dir, Credential inCred, java.lang.String dn) throws AuthenticationFailedException, IllegalCredentialException, NiMException
AuthenticationFailedException
IllegalCredentialException
NiMException
protected Directory connectForRead(java.lang.String dn, java.lang.String pwd) throws DirAuthenticationFailedException, DirectoryException, NiMException
DirAuthenticationFailedException
DirectoryException
NiMException
protected Directory connectForWrite(java.lang.String dn, java.lang.String pwd) throws DirAuthenticationFailedException, DirectoryException, NiMException
DirAuthenticationFailedException
DirectoryException
NiMException
public void changeAuthenticationCredential(Credential oldCred, Credential newCred) throws AuthenticationFailedException, IllegalCredentialException, NiMException
AuthenticationService
changeAuthenticationCredential
in class AuthenticationService
oldCred
- The original credentialnewCred
- The new credential
AuthenticationFailedException
- If unable to authenticate the given credential
IllegalCredentialException
- If the credential is invalid or belongs to a type that is
not supported by this AuthenticationService.
NiMException
- If the kernel service fails to connect to back-end
authentication system.
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.