Class: HTTPX::Plugins::Authentication::Digest
- Inherits:
-
Object
- Object
- HTTPX::Plugins::Authentication::Digest
- Defined in:
- lib/httpx/plugins/auth/digest.rb,
sig/plugins/auth/digest.rbs
Constant Summary collapse
- Error =
Instance Method Summary collapse
Instance Method Details
#authenticate(request, authenticate) ⇒ String?
24 25 26 27 28 29 30 31 |
# File 'lib/httpx/plugins/auth/digest.rb', line 24 def authenticate(request, authenticate) "Digest #{generate_header(request.verb, request.path, authenticate)}" rescue HTTPX::Error => e response = ErrorResponse.new(request, e) request.response = response request.emit_response(response) nil end |
#can_authenticate?(authenticate) ⇒ Boolean
20 21 22 |
# File 'lib/httpx/plugins/auth/digest.rb', line 20 def can_authenticate?(authenticate) authenticate && /Digest .*/.match?(authenticate) end |