Skip to content

Instantly share code, notes, and snippets.

@vpereira
Created June 20, 2011 16:56
Show Gist options
  • Save vpereira/1035988 to your computer and use it in GitHub Desktop.
Save vpereira/1035988 to your computer and use it in GitHub Desktop.
var LDAPConnection = require("LDAP").Connection;
var LDAP = new LDAPConnection();
if (LDAP.open("ldap://localhost", 3) < 0) {
throw new Error("Unable to connect to server");
}
LDAP.simpleBind("cn=bigshot,dc=test,dc=com","opensesame",function(msgid,err){
if(err)
console.log(err);
else
console.log(msgid);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment