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

Connect To A Password Protected Redis Database #56

Closed
rickshin opened this issue Jul 27, 2011 · 2 comments
Closed

Connect To A Password Protected Redis Database #56

rickshin opened this issue Jul 27, 2011 · 2 comments

Comments

@rickshin
Copy link

It does not appear that hiredis supports connecting to a password protected hiredis database.

@pietern
Copy link
Contributor

pietern commented Jul 28, 2011

Authentication is done after a connection has been made, and should be done by the consumer of the API like so:

reply= redisCommand(ctx, "AUTH %s", mypass);
if (reply->type == REDIS_REPLY_ERROR) {
    /* Authentication failed */
}
freeReplyObject(reply);

@arvindvis
Copy link

Hi
The AUTH command followed by other REDIS commands work in my environment. Is the ctx associated with the password once an AUTH command is executed and it remains until it gets destroyed ?
Thanks

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

3 participants