class HTTPClient::ProxyBasicAuth
Public Instance Methods
challenge(uri, param_str = nil)
click to toggle source
Challenge handler: remember URL for response.
# File lib/httpclient/auth.rb, line 321 def challenge(uri, param_str = nil) synchronize { @challenge['challenged'] = true true } end
get(req)
click to toggle source
# 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)
click to toggle source
# File lib/httpclient/auth.rb, line 307 def set(uri, user, passwd) synchronize do @cred = ["#{user}:#{passwd}"].pack('m').tr("\n", '') end end