Method: Faraday::Request::Authorization#initialize

Defined in:
lib/faraday/request/authorization.rb

#initialize(app, type, *params) ⇒ Authorization

Returns a new instance of Authorization.

Parameters:

  • app (#call)
  • type (String, Symbol)

    Type of Authorization

  • params (Array<String, Proc, #call>)

    parameters to build the Authorization header. If the type is :basic, then these can be a login and password pair. Otherwise, a single value is expected that will be appended after the type. This value can be a proc or an object responding to .call, in which case it will be invoked on each request.



16
17
18
19
20
# File 'lib/faraday/request/authorization.rb', line 16

def initialize(app, type, *params)
  @type = type
  @params = params
  super(app)
end