shaozi / ldap-authentication

🔐🔐🔐 A simple Nodejs Async LDAP authentication library
BSD 2-Clause "Simplified" License
110 stars 28 forks source link

Feature Request: Allow Passing Requested Attribute List #29

Closed mehmet6parmak closed 2 years ago

mehmet6parmak commented 2 years ago

Current implementation requests all attributes by default and does not allow requesting custom attribute lists. Default attribute list does not include calculated attributes and as far as I see there is no way to get calculated attributes currently.

If library allows passing custom requested attribute list, it will be possible to get calculated properties too.

shaozi commented 2 years ago

Sounds like a good suggestion. Do you have an example?

mehmet6parmak commented 2 years ago

You mean an example attribute name, right? In my case it was the "isMemberOf" attribute, which we use to get user group memberships. I am not an expert about ldap and don't know if this is because of a configuration of our server or something common.

vfilatov commented 2 years ago

Sounds like a good suggestion. Do you have an example?

http://ldapjs.org/client.html#search there are few options such as scope, filter, attributes, etc ldap-authentication uses only first two. Our company AD contains "zillions" of attributes and would be great if I could limit traffic only to ['mail', 'displayName', 'image']... Other then that ldap-authentication is good project, I but have to stick to https://github.com/ldapjs/node-ldapjs until this issue resolved.