Module: Aerospike::Connection::Authenticate

Defined in:
lib/aerospike/connection/authenticate.rb

Class Method Summary collapse

Class Method Details

.call(conn, user, hashed_pass) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/aerospike/connection/authenticate.rb', line 24

def call(conn, user, hashed_pass)
  command = LoginCommand.new
  command.authenticate(conn, user, hashed_pass)
  true
rescue ::Aerospike::Exceptions::Aerospike
  conn.close if conn
  raise ::Aerospike::Exceptions::InvalidCredentials
end