Class: OAuth::RequestProxy::ActionDispatchRequest — Documentation by YARD 0.9.45

# Class: OAuth::RequestProxy::ActionDispatchRequest

Inherits:
  RackRequest
  - Object
  - Base
  - RackRequest
  - OAuth::RequestProxy::ActionDispatchRequest
  show all

Defined in:
  lib/oauth/request_proxy/action_dispatch_request.rb

## Instance Attribute Summary

### Attributes inherited from Base

#options, #request, #unsigned_parameters

## Instance Method Summary collapse

- #parameters ⇒ Object

  Rails’ ActionDispatch proxy should expose array-style parameters for request/query params to align with legacy oauth gem expectations.

- #uri ⇒ Object

  Prefer the explicitly provided URI, which carries scheme/host info when ActionDispatch env may be minimal in tests.

### Methods inherited from RackRequest

#method

### Methods inherited from Base

#initialize, #non_oauth_parameters, #normalized_parameters, #normalized_uri, #oauth_callback, #oauth_consumer_key, #oauth_header, #oauth_nonce, #oauth_parameters, #oauth_signature, #oauth_signature_method, #oauth_timestamp, #oauth_token, #oauth_verifier, #oauth_version, #parameters_for_signature, proxies, #query_string_blank?, #sign, #sign!, #signature_and_unsigned_parameters, #signature_base_string, #signed?, #signed_uri

### Methods included from Helper

_escape, escape, generate_key, generate_timestamp, normalize, normalize_nested_query, parse_header, stringify_keys, unescape

## Constructor Details

This class inherits a constructor from OAuth::RequestProxy::Base

## Instance Method Details

### #parameters ⇒ `Object`

Rails’ ActionDispatch proxy should expose array-style parameters
for request/query params to align with legacy oauth gem expectations.

    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    # File 'lib/oauth/request_proxy/action_dispatch_request.rb', line 18

    def parameters
      if options[:clobber_request]
        options[:parameters] || {}
      else
        rq = wrap_values(request_params)
        qq = wrap_values(query_params)
        params = rq.merge(qq).merge(header_params)
        params.merge(options[:parameters] || {})
      end
    end

### #uri ⇒ `Object`

Prefer the explicitly provided URI, which carries scheme/host info
when ActionDispatch env may be minimal in tests.

    12
    13
    14
    # File 'lib/oauth/request_proxy/action_dispatch_request.rb', line 12

    def uri
      options[:uri] || super
    end