Skip to end of metadata
Go to start of metadata

LDAP authentication is a major requirement in most LDAP based applications. The  authenticate operation simplifies the LDAP authentication mechanism. This operation authenticates the provided Distinguished Name(DN) and password against the LDAP server, and returns either a success or failure response depending on whether the authentication was successful or not.

authenticate
<ldap.authenticate>
    <dn>{$ctx:dn}</dn>
    <password>{$ctx:password}</password>
</ldap.authenticate>
  • dn : The distinguished name of the user.
  • password : The password of the user.
Sample request
Sample request for authentication
{
    "providerUrl":"ldap://localhost:10389/",
    "securityPrincipal":"cn=admin,dc=wso2,dc=com",
    "securityCredentials":"comadmin",
    "secureConnection":"false",
    "disableSSLCertificateChecking":"false",
    "application": "ldap",
    "operation":"authenticate",
    "content":{
        "dn":"uid=testDim20,ou=staff,dc=wso2,dc=com",
        "password":"12345"
    }
}
Authentication success response
<Response xmlns="http://localhost/services/ldap">
   	<result>
      	<message>Success</message>
   	</result>
</Response>
Authentication failure response
<Response xmlns="http://localhost/services/ldap">
   	<result>
      	<message>Fail</message>
   	</result>
</Response>

Error codes

This section describes the connector error codes and their meanings.

Error CodeDescription
7000001An error occurred while searching a LDAP entry.
7000002LDAP root user's credentials are invalid.
7000003An error occurred while adding a new LDAP entry.
7000004An error occurred while updating an existing LDAP entry.
7000005An error occurred while deleting a LDAP entry.
7000006The LDAP entry that is required to perform the operation does not exist.
Sample error response
<Fault xmlns="http://localhost/services/ldap">
   	<error>
      	<errorCode>700000X</errorCode>
      	<errorMessage>Error Message</errorMessage>
   	</error>
</Fault>
  • No labels