mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[openstack|compute] Added auth_token_expiration.
This commit is contained in:
parent
155b0c9157
commit
b8335b83a0
2 changed files with 4 additions and 0 deletions
|
@ -148,11 +148,13 @@ module Fog
|
|||
mgmt_url = svc['endpoints'].detect{|x| x[@endpoint_type]}[@endpoint_type]
|
||||
identity_url = identity_svc['endpoints'].detect{|x| x['publicURL']}['publicURL'] if identity_svc
|
||||
token = body['access']['token']['id']
|
||||
expires = body['access']['token']['expires']
|
||||
|
||||
{
|
||||
:user => user,
|
||||
:tenant => tenant,
|
||||
:token => token,
|
||||
:expires => expires,
|
||||
:server_management_url => mgmt_url,
|
||||
:identity_public_endpoint => identity_url,
|
||||
:current_user_id => body['access']['user']['id']
|
||||
|
|
|
@ -226,6 +226,7 @@ module Fog
|
|||
|
||||
class Real
|
||||
attr_reader :auth_token
|
||||
attr_reader :auth_token_expiration
|
||||
attr_reader :current_user
|
||||
attr_reader :current_tenant
|
||||
|
||||
|
@ -338,6 +339,7 @@ module Fog
|
|||
|
||||
@openstack_must_reauthenticate = false
|
||||
@auth_token = credentials[:token]
|
||||
@auth_token_expiration = credentials[:expires]
|
||||
@openstack_management_url = credentials[:server_management_url]
|
||||
@openstack_identity_public_endpoint = credentials[:identity_public_endpoint]
|
||||
uri = URI.parse(@openstack_management_url)
|
||||
|
|
Loading…
Reference in a new issue