lua-resty-redis icon indicating copy to clipboard operation
lua-resty-redis copied to clipboard

Auth function need optional parameters username

Open kasora opened this issue 4 years ago • 1 comments
trafficstars

Redis 6.0 add username as an optional parameters

https://redis.io/commands/auth

kasora avatar Aug 23 '21 07:08 kasora

lua-resty-redis is supported auth [user] password command, just pass two parameters.

like this:

red:auth("user", "password")

example:

local res, err = red:auth("test", "123456")
if err then
    ngx.say("failed to auth: ", err)
    return
end

ngx.say(res)

cppcoffee avatar Sep 20 '21 14:09 cppcoffee