Sha256: d0ed9cebecef4d6d83bc2ca1643d572b4de83e359bc49d27d052d31df1cfd46e

Contents?: true

Size: 703 Bytes

Versions: 11

Compression:

Stored size: 703 Bytes

Contents

require 'oauth/request_proxy/base'
require 'uri'
require 'rack'

module OAuth::RequestProxy
  class RackRequest < OAuth::RequestProxy::Base
    proxies Rack::Request
    
    def method
      request.request_method
    end
    
    def uri
      request.url
    end

    def parameters
      if options[:clobber_request]
        options[:parameters] || {}
      else
        params = request_params.merge(query_params).merge(header_params)
        params.merge(options[:parameters] || {})
      end
    end
    
    def signature
      parameters['oauth_signature']
    end
    
    protected

    def query_params
      request.GET
    end

    def request_params
      request.params
    end
  end
end

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
monkeyhelper-oauth-0.3.1 lib/oauth/request_proxy/rack_request.rb
pelle-oauth-0.3.0 lib/oauth/request_proxy/rack_request.rb
pelle-oauth-0.3.1 lib/oauth/request_proxy/rack_request.rb
proletarian-oauth-0.3.2 lib/oauth/request_proxy/rack_request.rb
proletarian-oauth-0.3.3 lib/oauth/request_proxy/rack_request.rb
proletarian-oauth-0.3.4 lib/oauth/request_proxy/rack_request.rb
proletarian-oauth-0.3.5 lib/oauth/request_proxy/rack_request.rb
proletarian-oauth-0.3.6 lib/oauth/request_proxy/rack_request.rb
proletarian-oauth-0.3.7 lib/oauth/request_proxy/rack_request.rb
oauth-0.3.1 lib/oauth/request_proxy/rack_request.rb
oauth-0.3.0 lib/oauth/request_proxy/rack_request.rb