public class ProxyAuthenticationProtocolHandler extends AuthenticationProtocolHandler
A protocol handler that handles the 401 response code
in association with the Proxy-Authenticate
header.
WWWAuthenticationProtocolHandler
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
DEFAULT_MAX_CONTENT_LENGTH, LOG
Constructor and Description |
---|
ProxyAuthenticationProtocolHandler(HttpClient client) |
ProxyAuthenticationProtocolHandler(HttpClient client,
int maxContentLength) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Request request,
Response response)
Inspects the given
request and response
to detect whether this protocol handler should handle them. |
protected HttpHeader |
getAuthenticateHeader() |
protected String |
getAuthenticationAttribute() |
protected URI |
getAuthenticationURI(Request request) |
protected HttpHeader |
getAuthorizationHeader() |
String |
getName() |
getHttpClient, getResponseListener
public static final String NAME
public ProxyAuthenticationProtocolHandler(HttpClient client)
public ProxyAuthenticationProtocolHandler(HttpClient client, int maxContentLength)
public String getName()
public boolean accept(Request request, Response response)
ProtocolHandler
Inspects the given request
and response
to detect whether this protocol handler should handle them.
For example, a redirect protocol handler can inspect the response code and return true if it is a redirect response code.
This method is being called just after the response line has been parsed, and before the response headers are available.
request
- the request to acceptresponse
- the response to acceptprotected HttpHeader getAuthenticateHeader()
getAuthenticateHeader
in class AuthenticationProtocolHandler
protected HttpHeader getAuthorizationHeader()
getAuthorizationHeader
in class AuthenticationProtocolHandler
protected URI getAuthenticationURI(Request request)
getAuthenticationURI
in class AuthenticationProtocolHandler
protected String getAuthenticationAttribute()
getAuthenticationAttribute
in class AuthenticationProtocolHandler
Copyright © 1995-2016 Webtide. All Rights Reserved.