Class: HTTPClient::ProxyAuth

Class | HTTPClient::ProxyAuth
In: | lib/httpclient/auth.rb
Parent: | AuthFilterBase

Authentication filter for handling authentication negotiation between Proxy server. Parses ‘Proxy-Authentication’ header in response and generates ‘Proxy-Authorization’ header in request.

Authentication filter is implemented using request filter of HTTPClient. It traps HTTP response header and maintains authentication state, and traps HTTP request header for inserting necessary authentication header.

ProxyAuth has sub filters (BasicAuth, NegotiateAuth, and SSPINegotiateAuth) and delegates some operations to it. NegotiateAuth requires ‘ruby/ntlm’ module. SSPINegotiateAuth requires ‘win32/sspi’ module.

### Methods

filter_request filter_response new reset_challenge set_auth

### Attributes

basic_auth | [R] |
negotiate_auth | [R] |
sspi_negotiate_auth | [R] |

### Public Class methods

new()

Creates new ProxyAuth.

### Public Instance methods

filter_request(req)

Filter API implementation. Traps HTTP request and insert ‘Proxy-Authorization’ header if needed.

filter_response(req, res)

Filter API implementation. Traps HTTP response and parses ‘Proxy-Authenticate’ header.

reset_challenge()

Resets challenge state. See sub filters for more details.

set_auth(user, passwd)

Set authentication credential. See sub filters for more details.

[Validate]