node-ldapauth
node-ldapauth copied to clipboard
Return attributes
Contracting for a company that has a really slow LDAP server/network + returns massive LDAP records. I can't do anything about the slow server but it would be nice to specify the return attributes of the record instead of the whole record.
I've already modified it to work like that but the change is way too small to justify a fork (was only one line). Basically on line 119 of /lib/ldapauth.js, change:
var opts = {filter: searchFilter, scope: 'sub'};
to
var opts = {filter: searchFilter, scope: 'sub', attributes: ['Name', 'Email', 'BustSize']};
PS: The BustSize attribute is required! :)