This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/ldapjs
cranberry ed23347e56 Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
..
.github Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
examples Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
lib Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
test-integration/client Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
.taprc Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
CHANGES.md Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
LICENSE Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
README.md Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
docker-compose.yml Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
package.json Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00

README.md

LDAPjs

[Build Status] [Coverage Status]

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 youve got the OpenLDAP client on your system:

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

Installation

npm install ldapjs

DTrace support is included in ldapjs. To enable it, npm install dtrace-provider.

License

MIT.

Bugs

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