Method: Redis#auth

Defined in:
lib/redis.rb

#auth(password) ⇒ String

Authenticate to the server.

Parameters:

  • password (String)

    must match the password specified in the ‘requirepass` directive in the configuration file

Returns:

  • (String)

    ‘OK`



149
150
151
152
153
# File 'lib/redis.rb', line 149

def auth(password)
  synchronize do |client|
    client.call([:auth, password])
  end
end