BBjAPI::getLDAPConnection
Description
In BBj 11.00 and higher, this method returns a connection to an LDAP or Active Directory server. Use this method to connect to a specific LDAP server by specifying host, port, bind DN, and password. The method taking no parameters returns a connection to the LDAP server used for authentication.
Syntax
Return Value |
Method |
---|---|
getLDAPConnection() |
|
getLDAPConnection(string host, int port, string bindDN, string password) |
Parameters
Variable |
Description |
---|---|
host |
Host name or IP address of the LDAP or Active Directory server. |
port |
Port number the LDAP server is running on. |
bindDN |
Full DN (distinguished name) for authentication. Depending on the way the LDAP server is configured, this might be just the user name or it may be something like: uid=admin,ou=system |
password |
Password required for authentication. |
Return Value
Returns a BBjLDAPConnection object which provides access to the available LDAP operations on the server.
Remarks
Use this method to acquire a connection to a generic LDAP server, or a Microsoft Active Directory server since Active Directory uses LDAP as its foundational protocol.
Only use the method taking no parameters when:
- User authentication is enabled in BBjServices
- LDAP is the authentication mechanism used
Use the method taking host, port, bind DN, and password for connecting to any available LDAP server on the network.
Example 1
|
Example 2
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.