Method: Openstack::Swift::Client#authenticate!

Defined in:
lib/openstack-swift/client.rb

#authenticate!Object

Authentication method It stores the authentication url and token for future commands avoiding to request a new token for each request It should be used to force a new token



19
20
21
22
23
24
25
26
27
# File 'lib/openstack-swift/client.rb', line 19

def authenticate!
  @url, _, @token = SWIFT_API.auth(@proxy, @user, @password)

  if @url.blank? or @token.blank?
    raise AuthenticationError
  else
    true
  end
end