diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0058b67 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build +.lock-wscript \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b686093 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +LDAP Search Bindings for Node.JS +================================ + +This is a fork and merge of [node-LDAP](https://github.com/jeremycx/node-LDAP) and [node-ldapauth](https://github.com/joewalnes/node-ldapauth). + +Provides a simple function for running search queries on an LDAP server. + +It binds to the native OpenLDAP library (libldap) and calls ldap_simple_bind(). + +It has SSL (ldaps) and LDAP URI support. + +It does not yet support LDAP bind. + +Building +-------- + + node-waf configure build + +Usage +----- + +Ensure libldap (OpenLDAP client library) is installed. + +You need to add ldap.node to your application. + + var sys = require("sys"), + LDAPClient = require("./build/default/ldap.node"); // Path to ldapauth.node + + LDAPClient.Search("ldaps://ldap.example.tld/ou=people,dc=example,dc=tld?*?sub?uid=*", + function(err, result) { + if (err) { + sys.puts(err); + } else { + sys.puts("Result: "); + console.log(result); + } + } + ); + +Related projects +---------------- + +* https://github.com/joewalnes/node-ldapauth +* https://github.com/jeremycx/node-LDAP + +Resources +--------- + +* http://nodejs.org/ +* http://www.openldap.org/ +* man 3 ldap_bind + +*2010, xSmurf, xsmurf@smurfturf.net, http://mlalonde.net/* diff --git a/src/ldap.cc b/src/ldap.cc index ea0f3d0..b10f7f0 100644 --- a/src/ldap.cc +++ b/src/ldap.cc @@ -1,5 +1,6 @@ // Provides Node.JS binding for ldap_simple_bind(). // See README +// 2010, xSmurf, xsmurf@smurfturf.net, http://mlalonde.net/ // 2010, Joe Walnes, joe@walnes.com, http://joewalnes.com/