Skip to content

Commit d5f53dd

Browse files
committed
Added option to handle search timeLimit configurable
1 parent 7e13d15 commit d5f53dd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/ldapauth.js

+10
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,11 @@ LdapAuth.prototype._findUser = function (username, callback) {
316316

317317
var searchFilter = self.opts.searchFilter.replace(/{{username}}/g, sanitizeInput(username));
318318
var opts = { filter: searchFilter, scope: self.opts.searchScope };
319+
320+
if (self.opts.timeLimit){
321+
opts.timeLimit = self.opts.timeLimit;
322+
}
323+
319324
if (self.opts.searchAttributes) {
320325
opts.attributes = self.opts.searchAttributes;
321326
}
@@ -372,6 +377,11 @@ LdapAuth.prototype._findGroups = function (user, callback) {
372377
var searchFilter = self.opts.groupSearchFilter(user);
373378

374379
var opts = { filter: searchFilter, scope: self.opts.groupSearchScope };
380+
381+
if (self.opts.timeLimit){
382+
opts.timeLimit = self.opts.timeLimit;
383+
}
384+
375385
if (self.opts.groupSearchAttributes) {
376386
opts.attributes = self.opts.groupSearchAttributes;
377387
}

0 commit comments

Comments
 (0)