class Restforce::Middleware::Authorization
Piece of middleware that simply injects the OAuth token into the request headers.
Constants
- AUTH_HEADER
Public Instance Methods
call(env)
click to toggle source
# File lib/restforce/middleware/authorization.rb, line 9 def call(env) env[:request_headers][AUTH_HEADER] = %(OAuth #{token}) @app.call(env) end
token()
click to toggle source
# File lib/restforce/middleware/authorization.rb, line 14 def token @options[:oauth_token] end