Class: Faraday::Request::BasicAuthentication
- Inherits:
-
Authorization
- Object
- Middleware
- Authorization
- Faraday::Request::BasicAuthentication
- Defined in:
- lib/faraday/request/basic_authentication.rb
Constant Summary
Constants inherited from Authorization
Class Method Summary collapse
-
.header(login, pass) ⇒ Object
Public.
Methods inherited from Authorization
build_hash, #call, #initialize
Methods inherited from Middleware
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(login, pass) value = Base64.encode64([login, pass].join(':')) value.gsub!("\n", '') super(:Basic, value) end |