ldapjs-client is a JavaScript LDAP client library designed for modern Node.js environments, requiring Node.js >= 8.0. It offers a promise-based API for asynchronous interactions with LDAP servers, supporting common operations such as adding, binding, deleting, modifying, renaming (modifyDN), and searching for entries. A primary distinguishing feature of `ldapjs-client` is its intentional independence from the `ldapjs` package, which has been unmaintained for several years. This package positions itself as an actively supported alternative, addressing the need for robust LDAP client functionality in contemporary Node.js applications. The current stable version is 0.1.7. While specific release cadences are not detailed, the presence of continuous integration workflows suggests ongoing development and maintenance.
npm install ldapjs-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create an LDAP client, perform a basic search operation, and properly close the connection using asynchronous promise-based syntax.
Use `npm install ldapjs-client` instead of `npm install ldapjs`.
Always use `await` with client operations or handle the returned Promise with `.then()` and `.catch()`.
Pass only `proto://host:port` to the `url` option. Other search parameters like `filter`, `scope`, `attributes` should be passed as separate options to the `search` method.
Verify the LDAP server is running and reachable from the client's network. Check the IP address and port in the `url` option of the LdapClient constructor for correctness.
Double-check the credentials used in `client.bind('username', 'password')`. Ensure the DN is correctly formatted and the password matches the LDAP server's record.Verify the exact DN string for the target entry. Use an LDAP browser or `search` operation to confirm the existence and correct DN of the object before performing modifications or deletions.
No dependency data recorded yet.