AUTH

AUTH authenticates a client connection to Yugabyte YEDIS API.

Synopsis

AUTH passwordThis 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

  1. $ CONFIG SET requirepass "yugapass"
  1. "OK"
  1. $ AUTH "yugapass"
  1. "OK"
  1. $ AUTH "bad"
  1. "ERR: Bad Password."
  1. $ CONFIG SET requirepass "yugapassA,yugapassB"
  1. "OK"
  1. $ AUTH "yugapassA"
  1. "OK"
  1. $ AUTH "yugapassB"
  1. "OK"
  1. $ AUTH "yugapassC"
  1. "ERR: Bad Password."

See lso

config