lib/aerospike/client.rb
# Change user's password. Clear-text password will be hashed using bcrypt before sending to server.
Change user's password. Clear-text password will be hashed using bcrypt before sending to server.
Change user ' s password . Clear - text password will be hashed using bcrypt before sending to server .
def change_password(user, password, options = nil)
      raise Aerospike::Exceptions::Aerospike.new(INVALID_USER) unless @cluster.user && @cluster.user != ""
      policy = create_policy(options, AdminPolicy, default_admin_policy)
      hash = AdminCommand.hash_password(password)
      command = AdminCommand.new
      if user == @cluster.user
        command.change_password(@cluster, policy, user, hash)
      else
        command.set_password(@cluster, policy, user, hash)
      end
      @cluster.change_password(user, hash)
    end
def change_password ( user , password , options = nil ) raise Aerospike :: Exceptions :: Aerospike . new ( INVALID_USER ) unless @cluster . user && @cluster . user != "" policy = create_policy ( options , AdminPolicy , default_admin_policy ) hash = AdminCommand . hash_password ( password ) command = AdminCommand . new if user == @cluster . user command . change_password ( @cluster , policy , user , hash ) else command . set_password ( @cluster , policy , user , hash ) end @cluster . change_password ( user , hash ) end
Change user's password.
Change user ' s password .
# Change own password. # Change other user's password by user admin.
user
password
options