@@ -180,7 +180,7 @@ Multi.prototype.info = Multi.prototype.INFO = function info (section, callback)
180
180
return this ;
181
181
} ;
182
182
183
- function auth_callback ( self , pass , user , callback ) {
183
+ function auth_callback ( self , user , pass , callback ) {
184
184
// Backward compatibility support for auth with password only
185
185
if ( user instanceof Function ) {
186
186
callback = user ;
@@ -196,7 +196,7 @@ function auth_callback (self, pass, user, callback) {
196
196
// If redis is still loading the db, it will not authenticate and everything else will fail
197
197
debug ( 'Redis still loading, trying to authenticate later' ) ;
198
198
setTimeout ( function ( ) {
199
- self . auth ( pass , user , callback ) ;
199
+ self . auth ( user , pass , callback ) ;
200
200
} , 100 ) ;
201
201
return ;
202
202
}
@@ -205,7 +205,7 @@ function auth_callback (self, pass, user, callback) {
205
205
} ;
206
206
}
207
207
208
- RedisClient . prototype . auth = RedisClient . prototype . AUTH = function auth ( pass , user , callback ) {
208
+ RedisClient . prototype . auth = RedisClient . prototype . AUTH = function auth ( user , pass , callback ) {
209
209
debug ( 'Sending auth to ' + this . address + ' id ' + this . connection_id ) ;
210
210
211
211
// Backward compatibility support for auth with password only
@@ -220,7 +220,7 @@ RedisClient.prototype.auth = RedisClient.prototype.AUTH = function auth (pass, u
220
220
this . ready = ready || this . offline_queue . length === 0 ;
221
221
var tmp ;
222
222
if ( user ) {
223
- tmp = this . internal_send_command ( new Command ( 'auth' , [ pass , user ] , auth_callback ( this , pass , user , callback ) ) ) ;
223
+ tmp = this . internal_send_command ( new Command ( 'auth' , [ user , pass ] , auth_callback ( this , user , pass , callback ) ) ) ;
224
224
} else {
225
225
tmp = this . internal_send_command ( new Command ( 'auth' , [ pass ] , auth_callback ( this , pass , callback ) ) ) ;
226
226
}
@@ -229,7 +229,7 @@ RedisClient.prototype.auth = RedisClient.prototype.AUTH = function auth (pass, u
229
229
} ;
230
230
231
231
// Only works with batch, not in a transaction
232
- Multi . prototype . auth = Multi . prototype . AUTH = function auth ( pass , user , callback ) {
232
+ Multi . prototype . auth = Multi . prototype . AUTH = function auth ( user , pass , callback ) {
233
233
debug ( 'Sending auth to ' + this . address + ' id ' + this . connection_id ) ;
234
234
235
235
// Backward compatibility support for auth with password only
@@ -241,7 +241,7 @@ Multi.prototype.auth = Multi.prototype.AUTH = function auth (pass, user, callbac
241
241
this . auth_pass = pass ;
242
242
this . auth_user = user ;
243
243
if ( user ) {
244
- this . queue . push ( new Command ( 'auth' , [ pass , user ] , auth_callback ( this . _client , callback ) ) ) ;
244
+ this . queue . push ( new Command ( 'auth' , [ user , pass ] , auth_callback ( this . _client , callback ) ) ) ;
245
245
} else {
246
246
this . queue . push ( new Command ( 'auth' , [ pass ] , auth_callback ( this . _client , callback ) ) ) ;
247
247
}
0 commit comments