From c92ab077c0c32b3f84950ab36d0e71ecc6990a1b Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Fri, 21 Nov 2014 23:17:19 +1000 Subject: [PATCH] Support authentication for redis store if password provided --- lib/document_stores/redis.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/document_stores/redis.js b/lib/document_stores/redis.js index 859ea73..2301bbe 100644 --- a/lib/document_stores/redis.js +++ b/lib/document_stores/redis.js @@ -25,6 +25,10 @@ RedisDocumentStore.connect = function(options) { var port = options.port || 6379; var index = options.db || 0; RedisDocumentStore.client = redis.createClient(port, host); + // authenticate if password is provided + if (options.password) { + RedisDocumentStore.client.auth(options.password); + } RedisDocumentStore.client.select(index, function(err, reply) { if (err) { winston.error(