1
0
Fork 0

More readme fixes

master
Matthieu Lalonde 14 years ago committed by xSmurf
parent d85f4c08c9
commit aaa7fe7b2d

@ -3,9 +3,7 @@ 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). 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. Provides a simple LDAP bindings 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 see `man 3 ldap_url`. It has SSL (ldaps) and LDAP URI support see `man 3 ldap_url`.
@ -25,20 +23,33 @@ Ensure libldap (OpenLDAP client library) is installed.
You need to add ldap.node to your application. You need to add ldap.node to your application.
var sys = require("sys"), var LDAPClient = require("./build/default/ldap.node"); // Path to ldapauth.node
LDAPClient = require("./build/default/ldap.node"); // Path to ldapauth.node var LDAPUri = "ldaps://ldap.example.tld/ou=people,dc=example,dc=tld?cn,sn?sub?(uid=*)";
LDAPClient.Search("ldaps://ldap.example.tld/ou=people,dc=example,dc=tld?*?sub?uid=*", LDAPClient.Search(LDAPUri,
function(err, result) { function(err, result) {
if (err) { if (err) {
sys.puts(err); console.log(err);
} else { } else {
sys.puts("Result: "); console.log("Results: ");
console.log(result); console.log(result);
} }
} }
); );
/*
LDAP URI:
scheme://hostport/dn[?attrs[?scope[?filter]]]
scheme is the ldap scheme, either ldap, ldaps or ldapi
hostport is a host name with an optional ":portnumber"
dn is the search base
attrs is a comma separated list of attributes to request
scope is one of these three strings:
base one sub (default=base)
filter is ldap filter
*/
Related projects Related projects
---------------- ----------------

Loading…
Cancel
Save