node-ldapauth icon indicating copy to clipboard operation
node-ldapauth copied to clipboard

Return attributes

Open DrunkenBeetle opened this issue 11 years ago • 0 comments

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! :)

DrunkenBeetle avatar May 13 '13 10:05 DrunkenBeetle