LDAP : The LDAP Players : LDAP session

LDAP session
It is necessary to create an LDAP session (Smalltalk class LdapSession) with the LDAP server before performing any operations on the server's data.
1.
2.
3.
4.
See EsLdapExamples class>> newLdapSessionForExample. In this example the hostname is 127.0.0.1 (aka localhost) and the port is 10389. These correspond to the way the Apache Directory Studio was set up.
Among other messages, LdapSession understands:
getFirstRootEntry –
Gets the first root entry. (See EsLdapExamples class>> exampleGetFirstRootEntry.)
getAllRootEntries –
Gets all the first root entries. (See EsLdapExamples class>> exampleGetAllRootEntries.)
unbind –
Frees all resources associated with an LDAP session.
 
Note:
Best practice is to end the session once the data is no longer required.