Class: Ripcord::Authentication::HTTPBasicAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/ripcord/authentication/http_basic_auth.rb

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ HTTPBasicAuth

Returns a new instance of HTTPBasicAuth.



4
5
6
7
# File 'lib/ripcord/authentication/http_basic_auth.rb', line 4

def initialize(username, password)
  @username = username
  @password = password
end

Instance Method Details

#apply_to(request, _payload_hash) ⇒ Object



9
10
11
# File 'lib/ripcord/authentication/http_basic_auth.rb', line 9

def apply_to(request, _payload_hash)
  request.basic_auth(@username, @password)
end