Class: Faraday::Request::BasicAuthentication

Inherits:
Authorization show all
Defined in:
lib/faraday/request/basic_authentication.rb

Constant Summary

Constants inherited from Authorization

Authorization::KEY

Class Method Summary collapse

Methods inherited from Authorization

build_hash, #call, #initialize

Methods inherited from Middleware

adapter?, dependency, inherited, #initialize, loaded?, new

Methods included from MiddlewareRegistry

#lookup_middleware, #register_middleware

Constructor Details

This class inherits a constructor from Faraday::Request::Authorization

Class Method Details

.header(login, pass) ⇒ Object

Public



6
7
8
9
10
# File 'lib/faraday/request/basic_authentication.rb', line 6

def self.header(, pass)
  value = Base64.encode64([, pass].join(':'))
  value.gsub!("\n", '')
  super(:Basic, value)
end