Sha256: a5706afecbc21da98612aa2fe3abbafd0ca1ada6a1a20832e3cbbcdae953e957
Contents?: true
Size: 572 Bytes
Versions: 67
Compression:
Stored size: 572 Bytes
Contents
# frozen_string_literal: true require "net/http" module Gemsmith module Authenticators # An authenticator for retrieving HTTP Basic authorization. class Basic def self.url "" end def initialize login, password, encrypter: Net::HTTP::Get.new("https://ignore.example.com") @login = login @password = password @encrypter = encrypter end def authorization encrypter.basic_auth(login, password).first end private attr_reader :login, :password, :encrypter end end end
Version data entries
67 entries across 67 versions & 1 rubygems