-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I have a setup that requires both username and password for memorydb in aws
redis-cli works fine: redis-cli -c -h my-redis --user my-user --pass mypassword
My redis pipline options contains both the username and password with a single blank space.
This setup doesn't seem to doesn't work:
{
Password: fmt.Sprintf(`%s %s`, redisUser, redisPass)
}
It seems like the following code need to be changed from:
if conn.opts.Password != "" {
req, _ = redis.AppendRequest(req, redis.Req("AUTH", conn.opts.Password))
}
to
if conn.opts.Password != "" && conn.opts.Username != "" {
req, _ = redis.AppendRequest(req, redis.Req("AUTH", conn.opts.Username, conn.opts.Password))
} else if conn.opts.Password != "" {
req, _ = redis.AppendRequest(req, redis.Req("AUTH", conn.opts.Password))
}
Metadata
Metadata
Assignees
Labels
No labels