class OpenStack::Keystone::Public::Auth::Token
Authentication Token
Public Instance Methods
expired?()
click to toggle source
True if the token is expired
# File lib/open_stack/keystone/public/auth.rb, line 152 def expired? DateTime.strptime(attributes[:expires], OpenStack::DATETIME_FORMAT) < DateTime.now.utc end
expires_at()
click to toggle source
Expiration date and time for this token
# File lib/open_stack/keystone/public/auth.rb, line 147 def expires_at DateTime.strptime(attributes[:expires], OpenStack::DATETIME_FORMAT) end
Protected Instance Methods
initialize(attributes = {}, persisted = false)
click to toggle source
Calls superclass method
# File lib/open_stack/keystone/public/auth.rb, line 136 def initialize(attributes = {}, persisted = false) # :notnew: attributes = attributes.with_indifferent_access new_attributes = { :id => attributes[:id], :expires => attributes[:expires] } super(new_attributes, persisted) end