Using Password-Based Authentication
The LDAP protocol provides a bind operation to allow clients to authenticate to the server. The simplest authentication method supported by the protocol is a method that allows the client to send a DN and password to the server.
In order to use the simple authentication method, you can invoke the LDAPConnection.authenticate method or an LDAPConnection.connect method variant that takes an authentication DN and password as parameters. Some of the possible exceptions that can be thrown include the following:
LDAPException.NO_SUCH_OBJECT. This exception is thrown if the DN you specify does not correspond to an entry in the directory.
LDAPException.INVALID_CREDENTIALS. This exception is thrown if the password you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access