1.0.4 • Published 7 years ago

ldap-search v1.0.4

Weekly downloads
10
License
ISC
Repository
-
Last release
7 years ago

Install

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install ldap-search

API

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

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);
}
1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago