Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # LDAPjs
  2. [!['Build status'][travis_image_url]][travis_page_url]
  3. [travis_image_url]: https://api.travis-ci.org/mcavage/node-ldapjs.svg
  4. [travis_page_url]: https://travis-ci.org/mcavage/node-ldapjs
  5. LDAPjs makes the LDAP protocol a first class citizen in Node.js.
  6. ## Usage
  7. For full docs, head on over to <http://ldapjs.org>.
  8. ```javascript
  9. var ldap = require('ldapjs');
  10. var server = ldap.createServer();
  11. server.search('dc=example', function(req, res, next) {
  12. var obj = {
  13. dn: req.dn.toString(),
  14. attributes: {
  15. objectclass: ['organization', 'top'],
  16. o: 'example'
  17. }
  18. };
  19. if (req.filter.matches(obj.attributes))
  20. res.send(obj);
  21. res.end();
  22. });
  23. server.listen(1389, function() {
  24. console.log('ldapjs listening at ' + server.url);
  25. });
  26. ```
  27. To run that, assuming you've got the [OpenLDAP](http://www.openldap.org/)
  28. client on your system:
  29. ldapsearch -H ldap://localhost:1389 -x -b dc=example objectclass=*
  30. ## Installation
  31. npm install ldapjs
  32. ## License
  33. MIT.
  34. ## Bugs
  35. See <https://github.com/mcavage/node-ldapjs/issues>.