Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
LDAP Client and Server API for node.js
JavaScript Other

This branch is 205 commits behind mcavage:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
deps
docs
examples
lib
test
tools
.dir-locals.el
.gitignore
.gitmodules
.travis.yml
LICENSE
Makefile
Makefile.deps
Makefile.targ
README.md
package.json

README.md

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

Usage

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

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 client on your system:

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

Installation

npm install ldapjs

License

MIT.

Bugs

See https://github.com/mcavage/node-ldapjs/issues.

Something went wrong with that request. Please try again.