|
|
|
|
- LDAPSession structure
- LDAP and User Groupware
LDAPConnect (Function) In french: LDAPConnecte Used to connect to an LDAP server via the characteristics defined in the LDAPSession structure. The connection is actually established during the first access ( LDAPFind for example). // Check the "Login/Password" couple // Initialization LDAPReset() LDAPSession.Host = "domain.local" LDAPSession.Port = 389 LDAPSession.Version = 3 LDAPSession.User = "user@domain.local" LDAPSession.Password = "pwd" // Connection LDAPConnect("MySession") Â // Find information about the user. sDn is string = LDAPFind("MySession", ... "cn=users,dc=domain,dc=local","sAMAccountName=tester") // Other possibility // sDn is string = LDAPFind("MySession", ... // "cn=users,dc=domain,dc=local","UserMainName=tester@domain.local") Â IF sDn = "" THEN // Unable to list the connection DN // The login and the password do not match Error("The password of the user " + LDAPSession.User + " is invalid.") END // Disconnection LDAPDisconnect("MySession") Syntax
<Result> = LDAPConnect(<LDAPÂ session>)
<Result>: Boolean - True if the connection is established,
- False otherwise. ErrorInfo returns more details about the error.
The connection is not established if the session name already exists.
<LDAP session>: Character string Name of LDAP session. This name must be unique. This name will be used to identify the session in all LDAP functions. Remarks The LDAPSession structure is used to specify the characteristics of the LDAP session to use (server address, port, etc.). This structure must be initialized before the call to LDAPConnect. This structure is also used to specify different options such as the management mode of SSL or the connection mode. You project can be automatically connected to an LDAP directory via the User Groupware.
Related Examples:
|
Unit examples (WINDEV): The LDAP functions
[ + ] Using the WLanguage LDAP functions. These functions are used to interact with the LDAP data, to view the content of any LDAP directory and to modify the LDAP data: LDAPConnect, LDAPListChildren, LDAPAdAttribute, LDAPDeleteAttributeValue, ...
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|