AUTH
AUTH
authenticates a client connection to Yugabyte YEDIS API.
Synopsis
AUTH password
This command authenticates a client connection to YugabyteDB's YEDIS API.
YugabyteDB can be setup to require a password for clients to authenticate themselves. The password verification can be enforced by using the CONFIG
command to set the intended password (See CONFIG
).
YEDIS allows for multiple passwords (up to 2) to be accepted.
- If the given
password
matches with any of the server configured password(s), server returns the status string "OK" and begins processing commands from the authenticated client. - If the given
password
does not match with any of the server configured password(s), an error is raised
Return value
Returns a status string if the password is accepted. Returns an error if the password is rejected.
Examples
$ CONFIG SET requirepass "yugapass"
"OK"
$ AUTH "yugapass"
"OK"
$ AUTH "bad"
"ERR: Bad Password."
$ CONFIG SET requirepass "yugapassA,yugapassB"
"OK"
$ AUTH "yugapassA"
"OK"
$ AUTH "yugapassB"
"OK"
$ AUTH "yugapassC"
"ERR: Bad Password."