Can I please have a flag (or another method), where a AuthenticationResult object is returned instead of the user object, which contains:
- the user object,
- the result message/error,
- a flag where I can check against a constant (RESULT_SUCCESS, RESULT_INVALID_CREDENTIALS etc.),
- and the ldapjs client object?
I'm guessing many other want to do some extra checks after the user was authenticated, e.g. check if user belongs to a group recursively.
If that's ok, I would be happy to provide a PR.