Class: Gemsmith::Authenticators::Basic
- Inherits:
-
Object
- Object
- Gemsmith::Authenticators::Basic
- Defined in:
- lib/gemsmith/authenticators/basic.rb
Overview
An authenticator for retrieving HTTP Basic authorization.
Class Method Summary collapse
Instance Method Summary collapse
- #authorization ⇒ Object
-
#initialize(login, password, encrypter: Net::HTTP::Get.new("https://ignore.example.com")) ⇒ Basic
constructor
A new instance of Basic.
Constructor Details
#initialize(login, password, encrypter: Net::HTTP::Get.new("https://ignore.example.com")) ⇒ Basic
Returns a new instance of Basic.
13 14 15 16 17 |
# File 'lib/gemsmith/authenticators/basic.rb', line 13 def initialize login, password, encrypter: Net::HTTP::Get.new("https://ignore.example.com") @login = login @password = password @encrypter = encrypter end |
Class Method Details
.url ⇒ Object
9 10 11 |
# File 'lib/gemsmith/authenticators/basic.rb', line 9 def self.url "" end |
Instance Method Details
#authorization ⇒ Object
19 20 21 |
# File 'lib/gemsmith/authenticators/basic.rb', line 19 def encrypter.basic_auth(login, password).first end |