Skip to content

Commit

Permalink
allow reconnect option send to node-ldap client
Browse files Browse the repository at this point in the history
  • Loading branch information
cgalibern committed Dec 14, 2015
1 parent d1a0979 commit 1a77de1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/ldapauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ var getOption = function(obj, keys) {
* includeRaw {boolean}
* Optional, default false. Set to true to add property '_raw'
* containing the original buffers to the returned user object.
* Useful when you need to handle binary attributes.
* Useful when you need to handle binary attributes
* reconnect {object}
* Optional, node-ldap reconnect option.
*/
function LdapAuth(opts) {
this.opts = opts;
Expand Down Expand Up @@ -132,6 +134,10 @@ function LdapAuth(opts) {
maxIdleTime: opts.maxIdleTime
};

if (opts.reconnect) {
this.clientOpts.reconnect = opts.reconnect;
}

if (opts.log4js && opts.verbose) {
this.clientOpts.log4js = opts.log4js;
}
Expand Down

0 comments on commit 1a77de1

Please sign in to comment.