# ldapjs

> LDAP client and server APIs

Latest version **3.0.7** (published 2023-12-01) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ldapjs
pnpm add ldapjs
yarn add ldapjs
bun add ldapjs
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.0.7 |
| Published | 2023-12-01 |
| First published | 2011-08-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/ldapjs) |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 326.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1623 |
| Maintainers | melloc, jsumners, jgeurts, tonybrix, pfmooney, mcavage |

## Links

- npm: https://www.npmjs.com/package/ldapjs
- Repository: https://github.com/ldapjs/node-ldapjs
- Homepage: http://ldapjs.org
- Issues: https://github.com/ldapjs/node-ldapjs/issues
- npm.io page: https://npm.io/package/ldapjs

## Dependencies (14)

- [once](https://npm.io/package/once.md) ^1.4.0
- [vasync](https://npm.io/package/vasync.md) ^2.2.1
- [verror](https://npm.io/package/verror.md) ^1.10.1
- [backoff](https://npm.io/package/backoff.md) ^2.5.0
- [@ldapjs/dn](https://npm.io/package/@ldapjs/dn.md) ^1.1.0
- [assert-plus](https://npm.io/package/assert-plus.md) ^1.0.0
- [@ldapjs/asn1](https://npm.io/package/@ldapjs/asn1.md) ^2.0.0
- [@ldapjs/change](https://npm.io/package/@ldapjs/change.md) ^1.0.0
- [@ldapjs/filter](https://npm.io/package/@ldapjs/filter.md) ^2.1.1
- [@ldapjs/controls](https://npm.io/package/@ldapjs/controls.md) ^2.1.0
- [@ldapjs/messages](https://npm.io/package/@ldapjs/messages.md) ^1.3.0
- [@ldapjs/protocol](https://npm.io/package/@ldapjs/protocol.md) ^1.2.1
- [abstract-logging](https://npm.io/package/abstract-logging.md) ^2.0.1
- [@ldapjs/attribute](https://npm.io/package/@ldapjs/attribute.md) ^1.0.0

## Recent versions

- 3.0.7 (latest) — 2023-12-01
- 3.0.6 — 2023-11-10
- 3.0.5 — 2023-08-16
- 3.0.4 — 2023-07-22
- 3.0.3 — 2023-07-04
- 3.0.2 — 2023-03-28
- 3.0.1 — 2023-03-08
- 3.0.0 — 2023-02-22
- 2.3.3 — 2022-06-08
- 2.3.2 — 2022-02-25
- 2.3.1 — 2021-08-04
- 2.3.0 — 2021-05-27
- 2.2.4 — 2021-02-24
- 2.2.3 — 2020-12-03
- 2.2.2 — 2020-11-18
- … 64 more at https://npm.io/package/ldapjs/versions

## README

# LDAPjs

[![Build Status](https://github.com/ldapjs/node-ldapjs/workflows/Lint%20And%20Test/badge.svg)](https://github.com/ldapjs/node-ldapjs/actions)
[![Coverage Status](https://coveralls.io/repos/github/ldapjs/node-ldapjs/badge.svg)](https://coveralls.io/github/ldapjs/node-ldapjs/)

LDAPjs makes the LDAP protocol a first class citizen in Node.js.

## Usage

For full docs, head on over to <http://ldapjs.org>.

```javascript
var ldap = require('ldapjs');

var server = ldap.createServer();

server.search('dc=example', function(req, res, next) {
  var obj = {
    dn: req.dn.toString(),
    attributes: {
      objectclass: ['organization', 'top'],
      o: 'example'
    }
  };

  if (req.filter.matches(obj.attributes))
  res.send(obj);

  res.end();
});

server.listen(1389, function() {
  console.log('ldapjs listening at ' + server.url);
});
```

To run that, assuming you've got the [OpenLDAP](http://www.openldap.org/)
client on your system:

    ldapsearch -H ldap://localhost:1389 -x -b dc=example objectclass=*

## Installation

    npm install ldapjs

## Node.js Version Support

As of `ldapjs@3` we only support the active Node.js LTS releases.
See [https://github.com/nodejs/release#release-schedule][schedule] for the LTS
release schedule.

For a definitive list of Node.js version we support, see the version matrix
we test against in our [CI configuration][ci-config].

Note: given the release date of `ldapjs@3`, and the short window of time that
Node.js v14 had remaining on its LTS window, we opted to not support Node.js
v14 with `ldapjs@3` (we released late February 2023 and v14 goes into
maintenance in late April 2023). Also, Node.js v14 will be end-of-life (EOL) on
September 11, 2023; this is a very shortened EOL timeline and makes it even
more reasonable to not support it at this point.

[schedule]: https://github.com/nodejs/release#release-schedule
[ci-config]: https://github.com/ldapjs/node-ldapjs/blob/master/.github/workflows/main.yml

## License

MIT.

## Bugs

See <https://github.com/ldapjs/node-ldapjs/issues>.

---
_Source: https://npm.io/package/ldapjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
