This module provides a client api to the Lightweight Directory Access Protocol (LDAP).
References:
RFC 4510 - RFC 4519
RFC 2830
The above publications can be found at
Types
handle() Connection handle attribute() {Type = string(), Values=[string()]} modify_op() See mod_add/2, mod_delete/2, mod_replace/2 scope() See baseObject/0, singleLevel/0, wholeSubtree/0 dereference() See neverDerefAliases/0, derefInSearching/0, derefFindingBaseObj/0, derefAlways/0 filter() See present/1, substrings/2, equalityMatch/2, greaterOrEqual/2, lessOrEqual/2, approxMatch/2, extensibleMatch/2, 'and'/1, 'or'/1, 'not'/1.
Setup a connection to an LDAP server, the
Setup a connection to an LDAP server, the
The log function takes three arguments,
Timeout set the maximum time in milliseconds that each server request may take.
All TCP socket options are accepted except
Shutdown the connection.
Same as start_tls(Handle, Options, infinity)
Upgrade the connection associated with
The upgrade is done in two phases: first the server is asked for permission to upgrade. Second, if the request is acknowledged, the upgrade is performed.
Error responese from phase one will not affect the current encryption state of the connection. Those responses are:
Errors in the seconde phase will however end the connection:
Authenticate the connection using simple authentication.
Add an entry. The entry must not exist.
add(Handle, "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com", [{"objectclass", ["person"]}, {"cn", ["Bill Valentine"]}, {"sn", ["Valentine"]}, {"telephoneNumber", ["545 555 00"]}] )
Delete an entry.
delete(Handle, "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com")
Create an add modification operation.
Create a delete modification operation.
Create a replace modification operation.
Modify an entry.
modify(Handle, "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com", [eldap:mod_replace("telephoneNumber", ["555 555 00"]), eldap:mod_add("description", ["LDAP Hacker"]) ])
Modify the password of a user. See
Modify the password of a user.
Modify the DN of an entry.
modify_dn(Handle, "cn=Bill Valentine, ou=people, o=Example Org, dc=example, dc=com ", "cn=Bill Jr Valentine", true, "")
Search the directory with the supplied the SearchOptions.
The base and filter options must be supplied.
Default values: scope is
Filter = eldap:substrings("cn", [{any,"V"}]), search(Handle, [{base, "dc=example, dc=com"}, {filter, Filter}, {attributes, ["cn"]}]),
Search baseobject only.
Search the specified level only, i.e. do not recurse.
Search the entire subtree.
Never derefrence aliases, treat aliases as entries.
Always derefrence aliases.
Derefrence aliases only when searching.
Derefrence aliases only in finding the base.
Create a filter which filters on attribute type presence.
Create a filter which filters on substrings.
Create a equality filter.
Create a greater or equal filter.
Create a less or equal filter.
Create a approximation match filter.
Creates an extensible match filter. For example,
Creates a filter where all
Create a filter where at least one of the
Negate a filter.