# ldap-search

> LDAP search using UID

Latest version **1.0.4** (published 2017-03-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install ldap-search
pnpm add ldap-search
yarn add ldap-search
bun add ldap-search
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-03-07 |
| First published | 2017-03-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jain Mathew |
| Maintainers | jainmathew |

## Links

- npm: https://www.npmjs.com/package/ldap-search
- npm.io page: https://npm.io/package/ldap-search

## Dependencies (2)

- [assert](https://npm.io/package/assert.md) ^1.4.1
- [ldapjs](https://npm.io/package/ldapjs.md) ^1.0.1

## Recent versions

- 1.0.4 (latest) — 2017-03-07
- 1.0.3 — 2017-03-07
- 1.0.2 — 2017-03-07
- 1.0.1 — 2017-03-07
- 1.0.0 — 2017-03-07

## README

## Install

This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):

```sh
$ npm install ldap-search
```

## API

```js
var eidLookUpLDAP = require('ldap-search')
```

### ldapSearch(parameters, filter, attributes, res)

Create LDAP connection using the given parameters and perform LDAP search
using the filter criteria used. This function will return the list of attributes 
from LDAP (given as input).

## Examples

### LDAP search using UID

```js
var eidLookUpLDAP = require('ldap-search');

// Set the LDAP arguments
var ldapParameters = {
  user: "cn=foo,ou=users,o=example",
  pwd:  "secret",
  server: "LDAP://example.com",
  base: "o=example"
}

getLDAPinfo: function(req, res){  
  var ldapFilter = req.params.filter; //"xxxxxxx"
  var ldapAttributes = req.params.attributes; //"mail,cn,uid,telephonenumber";
  eidLookUpLDAP.ldapSearch(ldapParameters, ldapFilter, ldapAttributes, res);
}

```

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