BBjLDAPConnection::bind

Description

In BBj 11.0 and higher, this method reconnects and authenticates the user with the LDAP server.

Syntax

Return Value

Method

BBjLDAPBindResult

bind(string bindDN, string password)

Parameters

Parameter

Description

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 BBjLDAPBindResult object which contains information regarding the request.

Remarks

None.

Example

rem ' getLDAPConnection sample 1

use com.basis.bbj.proxies.ldap.BBjLDAPBindResult
use com.basis.bbj.proxies.ldap.BBjLDAPConnection

declare BBjLDAPConnection ldapCon!
declare BBjLDAPBindResult bindResult!

rem 'Get a connection to a specific LDAP server
host$ = "localhost"
port = 10389
authDN$ = "uid=admin,ou=system"
pwd$ = "secret"
ldapCon! = BBjAPI().getLDAPConnection(host$, port, authDN$, pwd$)

rem 'Unbind and close the connection
ldapCon!.close()

rem 'Re-establish the connection
bindResult! = ldapCon!.bind(authDN$, pwd$)

See Also

BBjAPI

BBjLDAPConnection

BBjLDAPSearchResult

BBj Object Diagram for an illustration of the relationship between BBjObjects