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 312
def get(req)
  target_uri = req.header.request_uri
  synchronize {
    return nil unless @challenge['challenged']
    @cred
  }
end
set(uri, user, passwd) click to toggle source
# File lib/httpclient/auth.rb, line 305
def set(uri, user, passwd)
  synchronize do
    @cred = ["#{user}:#{passwd}"].pack('m').tr("\n", '')
    @set = true
  end
end