Class OAuth::RequestProxy::MockRequest
In: lib/oauth/request_proxy/mock_request.rb
Parent: OAuth::RequestProxy::Base

RequestProxy for Hashes to facilitate simpler signature creation. Usage:

  request = OAuth::RequestProxy.proxy      #      "method" => "iq",
     "uri"    => [from, to] * "&",
     "parameters" => {
       "oauth_consumer_key"     => oauth_consumer_key,
       "oauth_token"            => oauth_token,
       "oauth_signature_method" => "HMAC-SHA1"
     }

  signature = OAuth::Signature.sign      #     request,
    :consumer_secret => oauth_consumer_secret,
    :token_secret    => oauth_token_secret,

Methods

Public Instance methods

[Source]

# File lib/oauth/request_proxy/mock_request.rb, line 27
      def method
        @request["method"]
      end

[Source]

# File lib/oauth/request_proxy/mock_request.rb, line 31
      def normalized_uri
        super
      rescue
        # if this is a non-standard URI, it may not parse properly
        # in that case, assume that it's already been normalized
        uri
      end

[Source]

# File lib/oauth/request_proxy/mock_request.rb, line 23
      def parameters
        @request["parameters"]
      end

[Source]

# File lib/oauth/request_proxy/mock_request.rb, line 39
      def uri
        @request["uri"]
      end

[Validate]