module Aerospike::Connection::Authenticate

Public Class Methods

call(conn, user, hashed_pass) click to toggle source
# 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