lib/vcloud-rest/connection.rb
def login
      params = {
        'method' => :post,
        'command' => '/sessions'
      }

      response, headers = send_request(params)

      if !headers.has_key?(:x_vcloud_authorization)
        raise "Unable to authenticate: missing x_vcloud_authorization header"
      end

      extensibility_link = response.css("Link[rel='down:extensibility']")
      @extensibility = extensibility_link.first['href'] unless extensibility_link.empty?

      @auth_key = headers[:x_vcloud_authorization]
    end
def login
      params = {
        'method' => :post,
        'command' => '/sessions'
      }

      response, headers = send_request(params)

      if !headers.has_key?(:x_vcloud_authorization)
        raise "Unable to authenticate: missing x_vcloud_authorization header"
      end

      extensibility_link = response.css("Link[rel='down:extensibility']")
      @extensibility = extensibility_link.first['href'] unless extensibility_link.empty?

      @auth_key = headers[:x_vcloud_authorization]
    end
Authenticate against the specified server