Class: Fog::Identity::OpenStack::V3::Tokens
Instance Attribute Summary
#response
Instance Method Summary
collapse
#all, #destroy, #get, #load_response, #summary
Instance Method Details
#authenticate(auth) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/fog/openstack/models/identity_v3/tokens.rb', line 12
def authenticate(auth)
@@cache ||= {}
response = service.token_authenticate(auth)
token_hash = response.body['token']
Fog::Identity::OpenStack::V3::Token.new(
token_hash.merge(:service => service, :value => response.['X-Subject-Token']))
end
|
#check(subject_token) ⇒ Object
27
28
29
30
|
# File 'lib/fog/openstack/models/identity_v3/tokens.rb', line 27
def check(subject_token)
service.token_check(subject_token)
return true
end
|
#revoke(subject_token) ⇒ Object
32
33
34
35
|
# File 'lib/fog/openstack/models/identity_v3/tokens.rb', line 32
def revoke(subject_token)
service.token_revoke(subject_token)
return true
end
|
#validate(subject_token) ⇒ Object
20
21
22
23
24
25
|
# File 'lib/fog/openstack/models/identity_v3/tokens.rb', line 20
def validate(subject_token)
response = service.token_validate(subject_token)
token_hash = response.body['token']
Fog::Identity::OpenStack::V3::Token.new(
token_hash.merge(:service => service, :value => response.['X-Subject-Token']))
end
|