Class: HTTPClient::ProxyBasicAuth
- Defined in:
- lib/httpclient/auth.rb
Instance Attribute Summary
Attributes inherited from BasicAuth
Attributes inherited from AuthBase
Instance Method Summary collapse
-
#challenge(uri, param_str = nil) ⇒ Object
Challenge handler: remember URL for response.
- #get(req) ⇒ Object
- #set(uri, user, passwd) ⇒ Object
Methods inherited from BasicAuth
Methods inherited from AuthBase
Methods included from Util
#argument_to_hash, hash_find_value, #http?, #https?, #keyword_argument, try_require, uri_dirname, uri_part_of, urify, #warning
Constructor Details
This class inherits a constructor from HTTPClient::BasicAuth
Instance Method Details
#challenge(uri, param_str = nil) ⇒ Object
Challenge handler: remember URL for response.
321 322 323 324 325 326 |
# File 'lib/httpclient/auth.rb', line 321 def challenge(uri, param_str = nil) synchronize { @challenge['challenged'] = true true } end |
#get(req) ⇒ Object
313 314 315 316 317 318 |
# File 'lib/httpclient/auth.rb', line 313 def get(req) synchronize { return nil if !@force_auth and !@challenge['challenged'] @cred } end |
#set(uri, user, passwd) ⇒ Object
307 308 309 310 311 |
# File 'lib/httpclient/auth.rb', line 307 def set(uri, user, passwd) synchronize do @cred = ["#{user}:#{passwd}"].pack('m').tr("\n", '') end end |