vesse / node-ldapauth-fork

Simple node.js module to authenticate against an LDAP server
Other
127 stars 79 forks source link

[Improvement] Make search timeLimit configurable #91

Open Hulcsa opened 3 years ago

Hulcsa commented 3 years ago

First of all, thank you for this lib, saved me a lot of time!

There is just one thing that I could not configure and causes some issues in my app. Sadly, my LDAP server response time for a search request may take 15-20 seconds sometimes, but the default search time limit in ldapjs is 10 seconds, and I could not find a way to configure this value. Could you make this limit configurable, please?

Like this for example in ldapauth.js

LdapAuth.prototype._search = function(searchBase, options, callback) {
  var self = this;

  options.timeLimit = self.opts.searchTimeLimit;
  ...

Thanks in advance!

gugan-guidanz commented 2 years ago

This might fix the issue https://github.com/vesse/node-ldapauth-fork/pull/102