def auth=(auth_hash)
      # symbolize the keys
      new_auth_hash = {}
      auth_hash.each {|k, v| new_auth_hash[k.to_sym] = v}
      auth_hash = new_auth_hash

      if auth_hash.has_key? :access_token
        # clear the basic_auth, if it's set
        self.class.default_options.reject!{ |k| k == :basic_auth }

        # set the Authorization headers
        self.class.headers.merge!("Authorization" => "Bearer #{auth_hash[:access_token]}")
      elsif auth_hash.has_key?(:username) && auth_hash.has_key?(:password)
        self.class.basic_auth auth_hash[:username], auth_hash[:password]

        # remove the access_token from the headers, if it exists
        self.class.headers.reject!{ |k, v| k == "Authorization" }
      else
        raise """
        Incomplete authorization information passed in authorization hash.
        You must have either an :access_token or a username password combination (:username, :password).
        """
      end
    end
def auth=(auth_hash)
      # symbolize the keys
      new_auth_hash = {}
      auth_hash.each {|k, v| new_auth_hash[k.to_sym] = v}
      auth_hash = new_auth_hash

      if auth_hash.has_key? :access_token
        # clear the basic_auth, if it's set
        self.class.default_options.reject!{ |k| k == :basic_auth }

        # set the Authorization headers
        self.class.headers.merge!("Authorization" => "Bearer #{auth_hash[:access_token]}")
      elsif auth_hash.has_key?(:username) && auth_hash.has_key?(:password)
        self.class.basic_auth auth_hash[:username], auth_hash[:password]

        # remove the access_token from the headers, if it exists
        self.class.headers.reject!{ |k, v| k == "Authorization" }
      else
        raise """
        Incomplete authorization information passed in authorization hash.
        You must have either an :access_token or a username password combination (:username, :password).
        """
      end
    end
Initializes the Logan shared client with information required to communicate with Basecamp

 @param basecamp_id [String] the Basecamp company ID
 @param auth_hash [Hash] authorization hash consisting of a username and password combination (:username, :password) or an access_token (:access_token)
 @param user_agent [String] the user-agent string to include in header of requests
 Updates authorization information for Logan shared client

 @param auth_hash [Hash] authorization hash consisting of a username and password combination (:username, :password) or an access_token (:access_token)