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!