Sha256: 85cfb930b1366133807b5b1a1866c73a74f5d20e9ef88019d8c48858042d55a6
Contents?: true
Size: 631 Bytes
Versions: 2
Compression:
Stored size: 631 Bytes
Contents
# from https://github.com/jnunemaker/twitter/blob/master/lib/faraday/oauth.rb require 'faraday' require 'simple_oauth' # @private module Faraday # @private class Request::OAuth < Faraday::Middleware def call(env) params = env[:body].is_a?(Hash) ? env[:body] : {} signature_params = params.reject{|k,v| v.respond_to?(:content_type) } header = SimpleOAuth::Header.new(env[:method], env[:url], signature_params, @options) env[:request_headers]['Authorization'] = header.to_s @app.call(env) end def initialize(app, options) @app, @options = app, options end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
instapaper_full-0.0.4 | lib/faraday/oauth.rb |
instapaper_full-0.0.3 | lib/faraday/oauth.rb |