com.netscape.cms.authentication
Class UdnPwdDirAuthentication

java.lang.Object
  extended by com.netscape.cms.authentication.DirBasedAuthentication
      extended by com.netscape.cms.authentication.UdnPwdDirAuthentication
All Implemented Interfaces:
IAuthManager, IExtendedPluginInfo

public class UdnPwdDirAuthentication
extends DirBasedAuthentication

udn/pwd directory based authentication manager

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Field Summary
static java.lang.String CRED_PWD
           
static java.lang.String CRED_UDN
           
protected static java.lang.String[] mConfigParams
           
protected static java.lang.String[] mRequiredCreds
           
 
Fields inherited from class com.netscape.cms.authentication.DirBasedAuthentication
DEFAULT_DNPATTERN, mBaseDN, mConfig, mConnFactory, mExtendedPluginInfo, mImplName, mLdapAttrs, mLdapByteAttrs, mLdapConfig, mLdapStringAttrs, mLogger, mName, mPattern, PROP_BASEDN, PROP_DNPATTERN, PROP_LDAP, PROP_LDAPBYTEATTRS, PROP_LDAPSTRINGATTRS, USER_DN
 
Fields inherited from interface com.netscape.certsrv.authentication.IAuthManager
CRED_CERT_SERIAL_TO_REVOKE, CRED_HOST_NAME, CRED_SESSION_ID, CRED_SSL_CLIENT_CERT
 
Fields inherited from interface com.netscape.certsrv.base.IExtendedPluginInfo
HELP_TEXT, HELP_TOKEN
 
Constructor Summary
UdnPwdDirAuthentication()
          Default constructor, initialization must follow.
 
Method Summary
protected  java.lang.String authenticate(netscape.ldap.LDAPConnection conn, IAuthCredentials authCreds, AuthToken token)
          Authenticates a user based on udn, pwd in the directory.
 java.lang.String[] getConfigParams()
          Returns a list of configuration parameter names.
 java.lang.String[] getRequiredCreds()
          Returns array of required credentials for this authentication manager.
 void init(java.lang.String name, java.lang.String implName, IConfigStore config)
          Initializes the UdnPwdDirAuthentication auth manager.
 
Methods inherited from class com.netscape.cms.authentication.DirBasedAuthentication
authenticate, formCertInfo, formSubjectName, getConfigStore, getExtendedPluginInfo, getImplName, getLdapAttrs, getLdapByteAttrs, getName, init, log, setAuthTokenByteValue, setAuthTokenStringValue, setAuthTokenValues, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRED_UDN

public static final java.lang.String CRED_UDN
See Also:
Constant Field Values

CRED_PWD

public static final java.lang.String CRED_PWD
See Also:
Constant Field Values

mRequiredCreds

protected static java.lang.String[] mRequiredCreds

mConfigParams

protected static java.lang.String[] mConfigParams
Constructor Detail

UdnPwdDirAuthentication

public UdnPwdDirAuthentication()
Default constructor, initialization must follow.

Method Detail

init

public void init(java.lang.String name,
                 java.lang.String implName,
                 IConfigStore config)
          throws EBaseException
Initializes the UdnPwdDirAuthentication auth manager.

Specified by:
init in interface IAuthManager
Overrides:
init in class DirBasedAuthentication
Parameters:
name - - The name for this authentication manager instance.
implName - - The name of the authentication manager plugin.
config - - The configuration store for this instance.
Throws:
EBaseException - If an error occurs during initialization.

authenticate

protected java.lang.String authenticate(netscape.ldap.LDAPConnection conn,
                                        IAuthCredentials authCreds,
                                        AuthToken token)
                                 throws EBaseException
Authenticates a user based on udn, pwd in the directory.

Specified by:
authenticate in class DirBasedAuthentication
Parameters:
authCreds - The authentication credentials.
Returns:
The user's ldap entry dn.
Throws:
EInvalidCredentials - If the udn and password are not valid
EBaseException - If an internal error occurs.

getConfigParams

public java.lang.String[] getConfigParams()
Returns a list of configuration parameter names. The list is passed to the configuration console so instances of this implementation can be configured through the console.

Specified by:
getConfigParams in interface IAuthManager
Specified by:
getConfigParams in class DirBasedAuthentication
Returns:
String array of configuration parameter names.

getRequiredCreds

public java.lang.String[] getRequiredCreds()
Returns array of required credentials for this authentication manager.

Specified by:
getRequiredCreds in interface IAuthManager
Specified by:
getRequiredCreds in class DirBasedAuthentication
Returns:
Array of required credentials.