Class: Faraday::Request::TokenAuthentication
- Inherits:
-
Authorization
- Object
- Middleware
- Authorization
- Faraday::Request::TokenAuthentication
- Defined in:
- lib/faraday/request/token_authentication.rb
Constant Summary
Constants inherited from Authorization
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(app, token, options = nil) ⇒ TokenAuthentication
constructor
A new instance of TokenAuthentication.
Methods inherited from Authorization
Methods inherited from Middleware
dependency, inherited, loaded?, new
Methods included from MiddlewareRegistry
#lookup_middleware, #register_middleware
Constructor Details
#initialize(app, token, options = nil) ⇒ TokenAuthentication
Returns a new instance of TokenAuthentication.
10 11 12 |
# File 'lib/faraday/request/token_authentication.rb', line 10 def initialize(app, token, = nil) super(app, token, ) end |
Class Method Details
.header(token, options = nil) ⇒ Object
Public
4 5 6 7 8 |
# File 'lib/faraday/request/token_authentication.rb', line 4 def self.header(token, = nil) ||= {} [:token] = token super :Token, end |