Class: Gemsmith::Authenticators::Basic

Inherits:
Object
  • Object
show all
Defined in:
lib/gemsmith/authenticators/basic.rb

Overview

An authenticator for retrieving HTTP Basic authorization.

Class Method Summary collapse

Instance Method Summary collapse

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 , password, encrypter: Net::HTTP::Get.new("https://ignore.example.com")
  @login = 
  @password = password
  @encrypter = encrypter
end

Class Method Details

.urlObject



9
10
11
# File 'lib/gemsmith/authenticators/basic.rb', line 9

def self.url
  ""
end

Instance Method Details

#authorizationObject



19
20
21
# File 'lib/gemsmith/authenticators/basic.rb', line 19

def authorization
  encrypter.basic_auth(, password).first
end