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 java.lang.Object
implements AuthenticationInterface

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


Field Summary
static java.lang.String AUTH_MAP_LDAP_PASSWORD
          The name of the parameter used to specify the LDAP password used for the authentication.
static java.lang.String AUTH_MAP_LDAP_USERNAME
          The name of the parameter used to specify the user name to authenticate.
static java.lang.String INITCTX
          This constant holds the name of the class used as initial context.
static java.lang.String PARAM_LDAP_ADMIN_DN
          The name of the parameter used to specify the LDAP administrator's distinguished name.
static java.lang.String PARAM_LDAP_ADMIN_PWD
          The name of the parameter used to specify the LDAP administrator's password.
static java.lang.String PARAM_LDAP_BINARY_ATTRIBUTES
          The name of a configuration parameter.
static java.lang.String PARAM_LDAP_GROUP_SEARCHBASE
          The name of a configuration parameter.
static java.lang.String PARAM_LDAP_GROUP_SUPPORT
          The name of a configuration parameter.
static java.lang.String PARAM_LDAP_GROUPNAME_ATTRIBUTE
          The name of a configuration parameter.
static java.lang.String PARAM_LDAP_HOST_NAME
          The name of the parameter used to specify the LDAP host name.
static java.lang.String PARAM_LDAP_MEMBERSHIP_ATTRIBUTE
          The name of a configuration parameter.
static java.lang.String PARAM_LDAP_MEMBERSHIP_ATTRIBUTE_CONTENT
          The name of a configuration parameter.
static java.lang.String PARAM_LDAP_PORT
          The name of the parameter used to specify the LDAP port.
static java.lang.String PARAM_LDAP_SEARCH_BASE
          The name of the parameter used to specify the LDAP search base.
static java.lang.String PARAM_LDAP_SSL_ENABLED
          The name of the parameter used to specify that SSL is enabled or not.
static java.lang.String PARAM_LDAP_USERID_ATTRIBUTE
          The name of a configuration parameter.
 
Constructor Summary
LDAPAuthentication()
           
 
Method Summary
 void authenticate(java.util.Map<java.lang.String,java.lang.String> map)
          This method authenticates the user using the entries in the provided map.
 void authenticate(java.lang.String aUserName, java.lang.String aPassword)
          This method authenticates the user specified by the passed arguments.
 void close()
          Closes the initialized connection.
 java.lang.String getUserGroups()
           
 void initialize(java.util.Map<java.lang.String,java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.String PARAM_LDAP_USERID_ATTRIBUTE
The name of a configuration parameter.

See Also:
Constant Field Values

PARAM_LDAP_SSL_ENABLED

public static final java.lang.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 java.lang.String PARAM_LDAP_GROUP_SUPPORT
The name of a configuration parameter.

See Also:
Constant Field Values

PARAM_LDAP_MEMBERSHIP_ATTRIBUTE

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

See Also:
Constant Field Values

PARAM_LDAP_MEMBERSHIP_ATTRIBUTE_CONTENT

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

See Also:
Constant Field Values

PARAM_LDAP_GROUPNAME_ATTRIBUTE

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

See Also:
Constant Field Values

PARAM_LDAP_GROUP_SEARCHBASE

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

See Also:
Constant Field Values

PARAM_LDAP_BINARY_ATTRIBUTES

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

See Also:
Constant Field Values

AUTH_MAP_LDAP_USERNAME

public static final java.lang.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 java.lang.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(java.util.Map<java.lang.String,java.lang.String> configMap)
                throws java.lang.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:
java.lang.Exception - if the initialization fails.

authenticate

public void authenticate(java.util.Map<java.lang.String,java.lang.String> map)
                  throws java.lang.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:
java.lang.Exception - if the authentication fails.
See Also:
AUTH_MAP_LDAP_USERNAME, AUTH_MAP_LDAP_PASSWORD

authenticate

public void authenticate(java.lang.String aUserName,
                         java.lang.String aPassword)
                  throws java.lang.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:
java.lang.Exception - if the authentication fails.

close

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

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

getUserGroups

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