class Keratin::AuthN::API
Public Instance Methods
archive(account_id)
click to toggle source
# File lib/keratin/authn/api.rb, line 24 def archive(account_id) delete(path: "/accounts/#{account_id}").result end
expire_password(account_id)
click to toggle source
# File lib/keratin/authn/api.rb, line 37 def expire_password(account_id) patch(path: "/accounts/#{account_id}/expire_password") end
get(account_id)
click to toggle source
Calls superclass method
Keratin::Client#get
# File lib/keratin/authn/api.rb, line 6 def get(account_id) super(path: "/accounts/#{account_id}") end
import(username:, password:, locked: false)
click to toggle source
returns account_id or raises exception
# File lib/keratin/authn/api.rb, line 29 def import(username:, password:, locked: false) post(path: '/accounts/import', body: { username: username, password: password, locked: locked }).result['id'] end
lock(account_id)
click to toggle source
# File lib/keratin/authn/api.rb, line 16 def lock(account_id) patch(path: "/accounts/#{account_id}/lock").result end
unlock(account_id)
click to toggle source
# File lib/keratin/authn/api.rb, line 20 def unlock(account_id) patch(path: "/accounts/#{account_id}/unlock").result end
update(account_id, username:)
click to toggle source
# File lib/keratin/authn/api.rb, line 10 def update(account_id, username:) patch(path: "/accounts/#{account_id}", body: { username: username }).result end