Fix authentication issues (fix #47) #60
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes authentication issues reported in #47.
As I explained in the comments:
Using only one instance of LdapAuth causes this. A new instance need to be created for each new authentication like it was before this pull request: #42 . See vesse/node-ldapauth-fork#23 and ldapjs/node-ldapjs#318 for more informations. The cache is now manage by the plugin itself.
Changes made here are heavly inspirated by this PR: #46 (but seems to be abandoned).
Since I use my fork (for more than 6 months now) everything works fine and I don't have any authentication issues anymore.
Note that unbinding connections (
ldapClient.closeAsync
) do nothing on Node 10 (see ldapjs/node-ldapjs#483), but a fix have been proposed (ldapjs/node-ldapjs#497)