com.ibm.di.api.authentication
Class LDAPAuthentication

java.lang.Object
  extended by com.ibm.di.api.authentication.LDAPAuthentication
All Implemented Interfaces:
AuthenticationInterface

public class LDAPAuthentication
extends Object
implements AuthenticationInterface

This class provides the capability of authentication against a LDAP server.


Field Summary
static String AUTH_MAP_LDAP_PASSWORD
          The name of the parameter used to specify the LDAP password used for the authentication.
static String AUTH_MAP_LDAP_USERNAME
          The name of the parameter used to specify the user name to authenticate.
static String INITCTX
          This constant holds the name of the class used as initial context.
static String PARAM_LDAP_ADMIN_DN
          The name of the parameter used to specify the LDAP administrator's distinguished name.
static String PARAM_LDAP_ADMIN_PWD
          The name of the parameter used to specify the LDAP administrator's password.
static String PARAM_LDAP_BINARY_ATTRIBUTES
          The name of a configuration parameter.
static String PARAM_LDAP_GROUP_SEARCHBASE
          The name of a configuration parameter.
static String PARAM_LDAP_GROUP_SUPPORT
          The name of a configuration parameter.
static String PARAM_LDAP_GROUPNAME_ATTRIBUTE
          The name of a configuration parameter.
static String PARAM_LDAP_HOST_NAME
          The name of the parameter used to specify the LDAP host name.
static String PARAM_LDAP_MEMBERSHIP_ATTRIBUTE
          The name of a configuration parameter.
static String PARAM_LDAP_MEMBERSHIP_ATTRIBUTE_CONTENT
          The name of a configuration parameter.
static String PARAM_LDAP_PORT
          The name of the parameter used to specify the LDAP port.
static String PARAM_LDAP_SEARCH_BASE
          The name of the parameter used to specify the LDAP search base.
static String PARAM_LDAP_SSL_ENABLED
          The name of the parameter used to specify that SSL is enabled or not.
static String PARAM_LDAP_USERID_ATTRIBUTE
          The name of a configuration parameter.
 
Constructor Summary
LDAPAuthentication()
           
 
Method Summary
 void authenticate(Map<String,String> map)
          This method authenticates the user using the entries in the provided map.
 void authenticate(String aUserName, String aPassword)
          This method authenticates the user specified by the passed arguments.
 void close()
          Closes the initialized connection.
 String getUserGroups()
           
 void initialize(Map<String,String> configMap)
          Initializes the parameters used for the connection with the LDAP server using the provided as parameter configuration map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITCTX

public static final String INITCTX
This constant holds the name of the class used as initial context.

See Also:
Constant Field Values

PARAM_LDAP_HOST_NAME

public static final String PARAM_LDAP_HOST_NAME
The name of the parameter used to specify the LDAP host name.

See Also:
Constant Field Values

PARAM_LDAP_PORT

public static final String PARAM_LDAP_PORT
The name of the parameter used to specify the LDAP port.

See Also:
Constant Field Values

PARAM_LDAP_ADMIN_DN

public static final String PARAM_LDAP_ADMIN_DN
The name of the parameter used to specify the LDAP administrator's distinguished name.

See Also:
Constant Field Values

PARAM_LDAP_ADMIN_PWD

public static final String PARAM_LDAP_ADMIN_PWD
The name of the parameter used to specify the LDAP administrator's password.

See Also:
Constant Field Values

PARAM_LDAP_SEARCH_BASE

public static final String PARAM_LDAP_SEARCH_BASE
The name of the parameter used to specify the LDAP search base.

See Also:
Constant Field Values

PARAM_LDAP_USERID_ATTRIBUTE

public static final String PARAM_LDAP_USERID_ATTRIBUTE
The name of a configuration parameter.

See Also:
Constant Field Values

PARAM_LDAP_SSL_ENABLED

public static final String PARAM_LDAP_SSL_ENABLED
The name of the parameter used to specify that SSL is enabled or not.

See Also:
Constant Field Values

PARAM_LDAP_GROUP_SUPPORT

public static final String PARAM_LDAP_GROUP_SUPPORT
The name of a configuration parameter.

See Also:
Constant Field Values

PARAM_LDAP_MEMBERSHIP_ATTRIBUTE

public static final String PARAM_LDAP_MEMBERSHIP_ATTRIBUTE
The name of a configuration parameter.

See Also:
Constant Field Values

PARAM_LDAP_MEMBERSHIP_ATTRIBUTE_CONTENT

public static final String PARAM_LDAP_MEMBERSHIP_ATTRIBUTE_CONTENT
The name of a configuration parameter.

See Also:
Constant Field Values

PARAM_LDAP_GROUPNAME_ATTRIBUTE

public static final String PARAM_LDAP_GROUPNAME_ATTRIBUTE
The name of a configuration parameter.

See Also:
Constant Field Values

PARAM_LDAP_GROUP_SEARCHBASE

public static final String PARAM_LDAP_GROUP_SEARCHBASE
The name of a configuration parameter.

See Also:
Constant Field Values

PARAM_LDAP_BINARY_ATTRIBUTES

public static final String PARAM_LDAP_BINARY_ATTRIBUTES
The name of a configuration parameter.

See Also:
Constant Field Values

AUTH_MAP_LDAP_USERNAME

public static final String AUTH_MAP_LDAP_USERNAME
The name of the parameter used to specify the user name to authenticate.

See Also:
Constant Field Values

AUTH_MAP_LDAP_PASSWORD

public static final String AUTH_MAP_LDAP_PASSWORD
The name of the parameter used to specify the LDAP password used for the authentication.

See Also:
Constant Field Values
Constructor Detail

LDAPAuthentication

public LDAPAuthentication()
Method Detail

initialize

public void initialize(Map<String,String> configMap)
                throws Exception
Initializes the parameters used for the connection with the LDAP server using the provided as parameter configuration map.

Specified by:
initialize in interface AuthenticationInterface
Parameters:
configMap - the configuration held in a map.
Throws:
Exception - if the initialization fails.

authenticate

public void authenticate(Map<String,String> map)
                  throws Exception
This method authenticates the user using the entries in the provided map.

Specified by:
authenticate in interface AuthenticationInterface
Parameters:
map - the map containing the credentials used for the authentication.
Throws:
Exception - if the authentication fails.
See Also:
AUTH_MAP_LDAP_USERNAME, AUTH_MAP_LDAP_PASSWORD

authenticate

public void authenticate(String aUserName,
                         String aPassword)
                  throws Exception
This method authenticates the user specified by the passed arguments.

Specified by:
authenticate in interface AuthenticationInterface
Parameters:
aUserName - this is the user that will be authenticated.
aPassword - this is the password used for the authentication.
Throws:
Exception - if the authentication fails.

close

public void close()
           throws Exception
Closes the initialized connection.

Specified by:
close in interface AuthenticationInterface
Throws:
Exception - if an error occurs.

getUserGroups

public String getUserGroups()
Returns:
String object containing the LDAP groups, which the authenticating user is member of .
Since:
7.0