Class: Restforce::Bulk::Middleware::Authorization
- Inherits:
-
Middleware
- Object
- Middleware
- Restforce::Bulk::Middleware::Authorization
- Defined in:
- lib/restforce/bulk/middleware/authorization.rb
Overview
Piece of middleware that simply injects the OAuth token into the request headers.
Constant Summary collapse
- AUTH_HEADER =
'X-SFDC-Session'.freeze
Instance Method Summary collapse
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 |
# File 'lib/restforce/bulk/middleware/authorization.rb', line 8 def call(env) env[:request_headers][AUTH_HEADER] = @options[:oauth_token] @app.call(env) end |