Package Exports
- ldapjs
- ldapjs/lib/dn
- ldapjs/lib/errors
- ldapjs/lib/messages
- ldapjs/lib/messages/abandon_response
- ldapjs/lib/messages/add_response
- ldapjs/lib/messages/bind_response
- ldapjs/lib/messages/compare_response
- ldapjs/lib/messages/del_response
- ldapjs/lib/messages/ext_response
- ldapjs/lib/messages/moddn_response
- ldapjs/lib/messages/modify_response
- ldapjs/lib/messages/result
- ldapjs/lib/messages/search_entry
- ldapjs/lib/messages/search_request
- ldapjs/lib/messages/search_response
- ldapjs/lib/messages/unbind_response
- ldapjs/lib/protocol
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ldapjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.