Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth function need optional parameters username #234

Open
kasora opened this issue Aug 23, 2021 · 1 comment
Open

Auth function need optional parameters username #234

kasora opened this issue Aug 23, 2021 · 1 comment

Comments

@kasora
Copy link

kasora commented Aug 23, 2021

Redis 6.0 add username as an optional parameters

https://redis.io/commands/auth

@cppcoffee
Copy link
Member

cppcoffee commented Sep 20, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants