Class: Keratin::AuthN::API
Instance Attribute Summary
Attributes inherited from Client
#base
Instance Method Summary
collapse
Methods inherited from Client
#initialize
Instance Method Details
#archive(account_id) ⇒ Object
24
25
26
|
# File 'lib/keratin/authn/api.rb', line 24
def archive(account_id)
delete(path: "/accounts/#{account_id}").result
end
|
#expire_password(account_id) ⇒ Object
37
38
39
|
# File 'lib/keratin/authn/api.rb', line 37
def expire_password(account_id)
patch(path: "/accounts/#{account_id}/expire_password")
end
|
#get(account_id) ⇒ Object
6
7
8
|
# File 'lib/keratin/authn/api.rb', line 6
def get(account_id)
super(path: "/accounts/#{account_id}")
end
|
#import(username:, password:, locked: false) ⇒ Object
returns account_id or raises exception
29
30
31
32
33
34
35
|
# 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) ⇒ Object
16
17
18
|
# File 'lib/keratin/authn/api.rb', line 16
def lock(account_id)
patch(path: "/accounts/#{account_id}/lock").result
end
|
#unlock(account_id) ⇒ Object
20
21
22
|
# File 'lib/keratin/authn/api.rb', line 20
def unlock(account_id)
patch(path: "/accounts/#{account_id}/unlock").result
end
|
#update(account_id, username:) ⇒ Object
10
11
12
13
14
|
# File 'lib/keratin/authn/api.rb', line 10
def update(account_id, username:)
patch(path: "/accounts/#{account_id}", body: {
username: username
}).result
end
|