Class: HTTPClient::ProxyDigestAuth
- Inherits:
-
DigestAuth
- Object
- DigestAuth
- HTTPClient::ProxyDigestAuth
- Defined in:
- lib/httpclient/auth.rb
Overview
Authentication filter for handling DigestAuth negotiation. Ignores uri argument. Used in ProxyAuth.
Instance Attribute Summary
Attributes inherited from DigestAuth
Instance Method Summary collapse
- #challenge(uri, param_str) ⇒ Object
-
#get(req) ⇒ Object
overrides DigestAuth#get.
- #reset_challenge ⇒ Object
-
#set(uri, user, passwd) ⇒ Object
overrides DigestAuth#set.
Methods inherited from DigestAuth
Constructor Details
This class inherits a constructor from HTTPClient::DigestAuth
Instance Method Details
#challenge(uri, param_str) ⇒ Object
468 469 470 471 |
# File 'lib/httpclient/auth.rb', line 468 def challenge(uri, param_str) @challenge = parse_challenge_param(param_str) true end |
#get(req) ⇒ Object
overrides DigestAuth#get. Uses default user name and password regardless of target uri if the proxy has required authentication before
455 456 457 458 459 460 461 462 |
# File 'lib/httpclient/auth.rb', line 455 def get(req) target_uri = req.header.request_uri param = @challenge return nil unless param user, passwd = @auth return nil unless user calc_cred(req, user, passwd, param) end |
#reset_challenge ⇒ Object
464 465 466 |
# File 'lib/httpclient/auth.rb', line 464 def reset_challenge @challenge = nil end |
#set(uri, user, passwd) ⇒ Object
overrides DigestAuth#set. sets default user name and password. uri is not used.
447 448 449 450 |
# File 'lib/httpclient/auth.rb', line 447 def set(uri, user, passwd) @set = true @auth = [user, passwd] end |