Class FaradayMiddleware::OAuth
In: lib/faraday_middleware/request/oauth.rb
Parent: Faraday::Middleware

Public: Uses the simple_oauth library to sign requests according the OAuth protocol.

The options for this middleware are forwarded to SimpleOAuth::Header: :consumer_key, :consumer_secret, :token, :token_secret. All these parameters are optional.

The signature is added to the "Authorization" HTTP request header. If the value for this header already exists, it is not overriden.

For requests that have parameters in the body, such as POST, this middleware expects them to be in Hash form, i.e. not encoded to string. This means this middleware has to be positioned on the stack before any encoding middleware such as UrlEncoded.

Methods

Constants

AUTH_HEADER = 'Authorization'.freeze

Public Class methods

Public Instance methods

[Validate]