class HTTPX::Plugins::Authentication::Basic

  1. lib/httpx/plugins/auth/basic.rb
Superclass: Object

Methods

Public Class

  1. new

Public Instance

  1. authenticate

Public Class methods

new(user, password, **)
[show source]
   # File lib/httpx/plugins/auth/basic.rb
 9 def initialize(user, password, **)
10   @user = user
11   @password = password
12 end

Public Instance methods

authenticate(*)
[show source]
   # File lib/httpx/plugins/auth/basic.rb
14 def authenticate(*)
15   "Basic #{Base64.strict_encode64("#{@user}:#{@password}")}"
16 end