Class: ActionController::TestRequest

### Home Classes Methods

### In Files

- lib/oauth/client/action_controller_request.rb

### Parent

Object

### Methods

- ::use_oauth=
- ::use_oauth?
- #apply_oauth!
- #configure_oauth
- #set_oauth_header
- #set_oauth_parameters
- #set_oauth_query_string

### Files

- LICENSE
- README.rdoc
- TODO

### Class/Module Index

Quicksearch

- OAuth
- OAuth::AccessToken
- OAuth::CLI
- OAuth::Client
- OAuth::Client::Helper
- OAuth::Consumer
- OAuth::ConsumerToken
- OAuth::Error
- OAuth::Helper
- OAuth::OAuthTestHelper
- OAuth::Problem
- OAuth::RequestProxy
- OAuth::RequestProxy::ActionControllerRequest
- OAuth::RequestProxy::Base
- OAuth::RequestProxy::Curl
- OAuth::RequestProxy::Curl::Easy
- OAuth::RequestProxy::EventMachine
- OAuth::RequestProxy::EventMachine::HttpRequest
- OAuth::RequestProxy::JabberRequest
- OAuth::RequestProxy::MockRequest
- OAuth::RequestProxy::Net
- OAuth::RequestProxy::Net::HTTP
- OAuth::RequestProxy::Net::HTTP::HTTPRequest
- OAuth::RequestProxy::RackRequest
- OAuth::RequestProxy::Typhoeus
- OAuth::RequestProxy::Typhoeus::Request
- OAuth::RequestProxy::UnknownRequestType
- OAuth::RequestToken
- OAuth::Server
- OAuth::ServerToken
- OAuth::Signature
- OAuth::Signature::Base
- OAuth::Signature::HMAC
- OAuth::Signature::HMAC::Base
- OAuth::Signature::HMAC::MD5
- OAuth::Signature::HMAC::RMD160
- OAuth::Signature::HMAC::SHA1
- OAuth::Signature::HMAC::SHA2
- OAuth::Signature::MD5
- OAuth::Signature::PLAINTEXT
- OAuth::Signature::RSA
- OAuth::Signature::RSA::SHA1
- OAuth::Signature::SHA1
- OAuth::Signature::UnknownSignatureMethod
- OAuth::Token
- OAuth::Unauthorized
- ActionController
- ActionController::Base
- ActionController::TestRequest
- Digest
- Digest::HMAC
- EventMachine
- EventMachine::HttpClient
- Net
- Net::HTTPGenericRequest
- Object
- String

No matching classes.

# ActionController::TestRequest

### Public Class Methods

use_oauth=(bool) click to toggle source

    # File lib/oauth/client/action_controller_request.rb, line 27
    def self.use_oauth=(bool)
      @use_oauth = bool
    end

use_oauth?() click to toggle source

    # File lib/oauth/client/action_controller_request.rb, line 31
    def self.use_oauth?
      @use_oauth
    end

### Public Instance Methods

apply_oauth!() click to toggle source

    # File lib/oauth/client/action_controller_request.rb, line 44
    def apply_oauth!
      return unless ActionController::TestRequest.use_oauth? && @oauth_options

      @oauth_helper = OAuth::Client::Helper.new(self, @oauth_options.merge(:request_uri => (respond_to?(:fullpath) ? fullpath : request_uri)))
      @oauth_helper.amend_user_agent_header(env)

      self.send("set_oauth_#{@oauth_options[:scheme]}")
    end

configure_oauth(consumer = nil, token = nil, options = {}) click to toggle source

    # File lib/oauth/client/action_controller_request.rb, line 35
    def configure_oauth(consumer = nil, token = nil, options = {})
      @oauth_options = { :consumer  => consumer,
                         :token     => token,
                         :scheme    => 'header',
                         :signature_method => nil,
                         :nonce     => nil,
                         :timestamp => nil }.merge(options)
    end

set_oauth_header() click to toggle source

    # File lib/oauth/client/action_controller_request.rb, line 53
    def set_oauth_header
      env['Authorization'] = @oauth_helper.header
    end

set_oauth_parameters() click to toggle source

    # File lib/oauth/client/action_controller_request.rb, line 57
    def set_oauth_parameters
      @query_parameters = @oauth_helper.parameters_with_oauth
      @query_parameters.merge!(:oauth_signature => @oauth_helper.signature)
    end

set_oauth_query_string() click to toggle source

    # File lib/oauth/client/action_controller_request.rb, line 62
    def set_oauth_query_string
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.