Module OAuth::RequestProxy
In: lib/oauth/request_proxy/action_controller_request.rb
lib/oauth/request_proxy/base.rb
lib/oauth/request_proxy/jabber_request.rb
lib/oauth/request_proxy/mock_request.rb
lib/oauth/request_proxy/rack_request.rb
lib/oauth/request_proxy.rb

Methods

proxy  

Classes and Modules

Module OAuth::RequestProxy::Net
Class OAuth::RequestProxy::ActionControllerRequest
Class OAuth::RequestProxy::Base
Class OAuth::RequestProxy::JabberRequest
Class OAuth::RequestProxy::MockRequest
Class OAuth::RequestProxy::RackRequest
Class OAuth::RequestProxy::UnknownRequestType

Public Class methods

[Source]

# File lib/oauth/request_proxy.rb, line 7
    def self.proxy(request, options = {})
      return request if request.kind_of?(OAuth::RequestProxy::Base)

      klass = available_proxies[request.class]

      # Search for possible superclass matches.
      if klass.nil?
        request_parent = available_proxies.keys.find { |rc| request.kind_of?(rc) }
        klass = available_proxies[request_parent]
      end

      raise UnknownRequestType, request.class.to_s unless klass
      klass.new(request, options)
    end

[Validate]