shaozi / ldap-authentication

πŸ”πŸ”πŸ” A simple Nodejs Async LDAP authentication library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow injection of `ldapjs` client and export help function

simonecorsi opened this issue Β· comments

Hey πŸ‘‹

It would be nice to export useful functions like verifyUserExists and also allow injecting our own ldapjs client while defaulting to the current behavior of instantiating its own with bind.

Use cases:

  • Allow usage of this package in env where no admin user is needed to list, eg local development LDAP server;
  • Mocking the client in tests.

Is this something you may want to add here, I'll see if I can make an MR, if not I'll just fork it :)

I can see it will be very useful in the testing scenario. A pull request is welcome!