Skip to content

Instantly share code, notes, and snippets.

View vpereira's full-sized avatar

Victor Pereira vpereira

View GitHub Profile
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);