|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HttpAuthenticator
Interface for classes that are able to apply some form of authentication to a
HttpClient instance. Provides a unified mechanism for applying
authentication that is agnostic of the actual authentication mechanism being
used.
| Method Summary | |
|---|---|
void |
apply(org.apache.http.impl.client.AbstractHttpClient client,
org.apache.http.protocol.HttpContext httpContext,
URI target)
Applies any necessary authentication methods to the given HTTP Client |
void |
invalidate()
Invalidates the authenticator |
| Method Detail |
|---|
void apply(org.apache.http.impl.client.AbstractHttpClient client,
org.apache.http.protocol.HttpContext httpContext,
URI target)
The target parameter indicates the URI to which the request is
being made and so may be used by an authenticator to determine whether it
actually needs to apply any authentication or to scope authentication
appropriately.
client - HTTP ClienthttpContext - HTTP Contexttarget - Target URI to which code wants to authenticatevoid invalidate()
Allows code to inform the authenticator that any cached authentication information should be invalidated. This can be useful after an authentication attempt fails or after a certain amount of time is passed. For many authenticators this may actually be a no-op since when using standard HTTP authentication typically you authenticate on every request and there are no cached authentication information. However more complex authentication mechanisms such as Form Based authentication may have cached information that discarding will force subsequent requests to re-authenticate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||