From 4dcfa0f92a640f79d7a9ee3d6db8c616285b4661 Mon Sep 17 00:00:00 2001 From: Henrik Peinar Date: Fri, 31 May 2013 10:54:11 -0700 Subject: [PATCH 1/2] Auth_pass should be part of options --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 6ec5ab3b7a..5c40333bbf 100644 --- a/index.js +++ b/index.js @@ -67,6 +67,9 @@ function RedisClient(stream, options) { this.closing = false; this.server_info = {}; this.auth_pass = null; + if(options.auth_pass !== undefined) { + this.auth_pass = options.auth_pass; + } this.parser_module = null; this.selected_db = null; // save the selected db here, used when reconnecting From 660b89bb42f96c752aa8393c0968f8212b0d33c1 Mon Sep 17 00:00:00 2001 From: Henrik Peinar Date: Fri, 31 May 2013 11:11:37 -0700 Subject: [PATCH 2/2] Added auth_pass to readme too --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 545ffe9911..b9285af50e 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,7 @@ to maximum value, provided in milliseconds. limits total time for client to reconnect. Value is provided in milliseconds and is counted once the disconnect occured. * `max_attempts` defaults to `null`. By default client will try reconnecting until connected. Setting `max_attempts` limits total amount of reconnects. +* `auth_pass` defaults to `null`. By default client will try connecting without auth. If set, client will run redis auth command on connect. ```js var redis = require("redis"),