Class: Faraday::Request::TokenAuthentication

Inherits:
Object
  • Object
show all
Defined in:
lib/faraday/request/token_authentication.rb

Class Method Summary collapse

Instance Method Summary collapse

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, options = nil)
  super(app, token, options)
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, options = nil)
  options ||= {}
  options[:token] = token
  super(:Token, options)
end