class HTTPX::Plugins::Authentication::Digest

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

Methods

Public Class

  1. new

Public Instance

  1. authenticate
  2. can_authenticate?

Public Class methods

new(user, password, hashed: false, **)
[show source]
   # File lib/httpx/plugins/auth/digest.rb
11 def initialize(user, password, hashed: false, **)
12   @user = user
13   @password = password
14   @nonce = 0
15   @hashed = hashed
16 end

Public Instance methods

authenticate(request, authenticate)
[show source]
   # File lib/httpx/plugins/auth/digest.rb
22 def authenticate(request, authenticate)
23   "Digest #{generate_header(request.verb, request.path, authenticate)}"
24 end
can_authenticate?(authenticate)
[show source]
   # File lib/httpx/plugins/auth/digest.rb
18 def can_authenticate?(authenticate)
19   authenticate && /Digest .*/.match?(authenticate)
20 end