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



16
17
18
19
20
21
22
23
24
# File 'lib/openstack-swift/client.rb', line 16

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

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