From 1a77de16d3c2f4be9b1925c4f3f5955f0a86a739 Mon Sep 17 00:00:00 2001 From: cgalibern Date: Mon, 14 Dec 2015 16:49:49 +0100 Subject: [PATCH] allow reconnect option send to node-ldap client https://github.com/vesse/node-ldapauth-fork/issues/23 --- lib/ldapauth.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ldapauth.js b/lib/ldapauth.js index 66f73be..5a1a3d9 100644 --- a/lib/ldapauth.js +++ b/lib/ldapauth.js @@ -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; @@ -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; }