module Fog::Rackspace::Identity::Common

Attributes

auth_token[R]
service_catalog[R]

Public Instance Methods

apply_options(options) click to toggle source
# File lib/fog/rackspace/identity.rb, line 45
def apply_options(options)
  @rackspace_username = options[:rackspace_username]
  @rackspace_api_key = options[:rackspace_api_key]
  @rackspace_region = options[:rackspace_region]
  @rackspace_auth_url = options[:rackspace_auth_url] || US_ENDPOINT

  @uri = URI.parse(@rackspace_auth_url)
  @host = @uri.host
  @path = @uri.path
  @port = @uri.port
  @scheme = @uri.scheme
  @persistent = options[:persistent] || false
  @connection_options = options[:connection_options] || {}
end
authenticate(options={}) click to toggle source
# File lib/fog/rackspace/identity.rb, line 39
def authenticate(options={})
  data = self.create_token(@rackspace_username, @rackspace_api_key).body
  @service_catalog = ServiceCatalog.from_response(self, data)
  @auth_token = data['access']['token']['id']
end