Functions - ldap

doAuthenticate

Authenticates with the username and password.

externDoAuthenticate
externInitLdapConnectionContext
getGroups

Retrieves the group(s) of the user related to the provided username.

initLdapConnectionContext

Initailizes the LDAP connection context.

doAuthenticate

(LdapConnection ldapConnection, string username, string password)

returns boolean | Error

Authenticates with the username and password.

 boolean|ldap:Error result = ldap:doAuthenticate(ldapConnection, username, password);

Parameters

  • username string
  • Username of the user to be authenticated

  • password string
  • Password of the user to be authenticated

  • Return Type

    (boolean | Error)
  • true if authentication is successful, false otherwise, or else an ldap:Error if an error occurred

externDoAuthenticate

(LdapConnection ldapConnection, handle username, handle password)

returns boolean | Error

Parameters

  • username handle
  • password handle
  • Return Type

    (boolean | Error)

externInitLdapConnectionContext

(LdapConnectionConfig ldapConnectionConfig, handle instanceId)

returns LdapConnection | Error

Parameters

  • instanceId handle

getGroups

(LdapConnection ldapConnection, string username)

returns string[] | Error

Retrieves the group(s) of the user related to the provided username.

 string[]|ldap:Error groups = ldap:getGroups(ldapConnection, username);

Parameters

  • username string
  • Username of the user to be checked for the groups

  • Return Type

    (string[] | Error)
  • Array of groups of the provided user or else an ldap:Error if it fails

initLdapConnectionContext

(LdapConnectionConfig ldapConnectionConfig, string instanceId)

returns LdapConnection | Error

Initailizes the LDAP connection context.

 ldap:LdapConnection|ldap:Error connection = ldap:initLdapConnectionContext(ldapConnectionConfig, instanceId);

Parameters

  • instanceId string
  • Instance ID of the endpoint

  • Return Type

    (LdapConnection | Error)
  • The ldap:LdapConnection instance or else an ldap:Error if an error occurred