Skip to content

Instantly share code, notes, and snippets.

View cgodkin's full-sized avatar

Carl Godkin cgodkin

  • Dynamic Graphics, Inc
View GitHub Profile
@jfromaniello
jfromaniello / Users.js
Created September 12, 2013 13:21
Fetch all the groups a user is member of with ldapjs
var nconf = require('nconf');
var ldap = require('ldapjs');
var async = require('async');
ldap.Attribute.settings.guid_format = ldap.GUID_FORMAT_D;
var Users = module.exports = function(){
var options = this._options = {
url: process.env["LDAP_URL"],
base: process.env["LDAP_BASE"],
bindDN: process.env["LDAP_BIND_USER"],