Constructor and Description |
---|
HttpAuthenticator() |
HttpAuthenticator(Logger log) |
Modifier and Type | Method and Description |
---|---|
void |
addAuthResponse(HttpHost host,
ChallengeType challengeType,
HttpRequest request,
AuthExchange authExchange,
HttpContext context)
Generates a response to the authentication challenge based on the actual
AuthExchange state
and adds it to the given HttpRequest message . |
boolean |
isChallenged(HttpHost host,
ChallengeType challengeType,
HttpResponse response,
AuthExchange authExchange,
HttpContext context)
Determines whether the given response represents an authentication challenge.
|
boolean |
updateAuthState(HttpHost host,
ChallengeType challengeType,
HttpResponse response,
AuthenticationStrategy authStrategy,
AuthExchange authExchange,
HttpContext context)
Updates the
AuthExchange state based on the challenge presented in the response message
using the given AuthenticationStrategy . |
public void addAuthResponse(HttpHost host, ChallengeType challengeType, HttpRequest request, AuthExchange authExchange, HttpContext context)
AuthExchange
state
and adds it to the given HttpRequest
message .host
- the hostname of the opposite endpoint.challengeType
- the challenge type (target or proxy).request
- the request message head.authExchange
- the current authentication exchange state.context
- the current execution context.public boolean isChallenged(HttpHost host, ChallengeType challengeType, HttpResponse response, AuthExchange authExchange, HttpContext context)
host
- the hostname of the opposite endpoint.challengeType
- the challenge type (target or proxy).response
- the response message head.authExchange
- the current authentication exchange state.context
- the current execution context.true
if the response message represents an authentication challenge,
false
otherwise.public boolean updateAuthState(HttpHost host, ChallengeType challengeType, HttpResponse response, AuthenticationStrategy authStrategy, AuthExchange authExchange, HttpContext context)
AuthExchange
state based on the challenge presented in the response message
using the given AuthenticationStrategy
.host
- the hostname of the opposite endpoint.challengeType
- the challenge type (target or proxy).response
- the response message head.authStrategy
- the authentication strategy.authExchange
- the current authentication exchange state.context
- the current execution context.true
if the authentication state has been updated,
false
if unchanged.