LdapServices.authenticate

Authenticates the supplied user/password combination against the Ldap Registry identified by properties in the XIldap.properties file file using simple authentication (user/password check).

This method works as follows:

  1. Connects to the Ldap Registry using the user identified by properties Ldap.BindDistinguishedName and Ldap.BindPassword in XIldap.properties file. If these properties are missing, attempts to bind anonymously.
  2. Searches the registry for the user name starting from the location identified by parameter baseDistinguishedName and obtains the full distinguished name (DN) identifying the user. Parameter userKeyAttributeName is used to build the search string.
  3. Connects to the registry using this DN and the supplied password.
Javascript example:
 var root = "OU=Ebase Users and Groups,DC=ebasetech,DC=com";
 var userAttr = "sAMAccountName";
 var logonOk = LdapServices.authenticate(fields.USER.value, fields.PASSWORD.value, root, userAttr, false);
 if (logonOk) 
   event.owner.addWarningMessage("Logon OK");
 else
   event.owner.addErrorMessage("Logon failed");
 

returns boolean

Parameters

java.lang.String  userName,  java.lang.String  password,  java.lang.String  baseDistinguishedName,  java.lang.String  userKeyAttributeName,  boolean  removeDomainNameFromUser,