class Gemsmith::Authenticators::Basic

An authenticator for retrieving HTTP Basic authorization.

Attributes

encrypter[R]
login[R]
password[R]

Public Class Methods

new(login, password, encrypter: Net::HTTP::Get.new("https://ignore.example.com")) click to toggle source
# 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
url() click to toggle source
# File lib/gemsmith/authenticators/basic.rb, line 9
def self.url
  ""
end

Public Instance Methods

authorization() click to toggle source
# File lib/gemsmith/authenticators/basic.rb, line 19
def authorization
  encrypter.basic_auth(login, password).first
end