public class DelegatingAuthenticator extends AbstractScopedAuthenticator<HttpAuthenticator>
Constructor and Description |
---|
DelegatingAuthenticator(Map<URI,HttpAuthenticator> authenticators)
Creates a new delegating authenticator
|
DelegatingAuthenticator(URI target,
HttpAuthenticator authenticator)
Creates a new delegating authenticator
|
Modifier and Type | Method and Description |
---|---|
void |
apply(org.apache.http.impl.client.AbstractHttpClient client,
org.apache.http.protocol.HttpContext context,
URI target)
Applies any necessary authentication methods to the given HTTP Client
|
invalidate
public DelegatingAuthenticator(URI target, HttpAuthenticator authenticator)
target
- Target URIauthenticator
- Authenticator to delegate topublic DelegatingAuthenticator(Map<URI,HttpAuthenticator> authenticators)
authenticators
- Mapping between URIs and authenticatorspublic void apply(org.apache.http.impl.client.AbstractHttpClient client, org.apache.http.protocol.HttpContext context, URI target)
HttpAuthenticator
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.
apply
in interface HttpAuthenticator
apply
in class AbstractCredentialsAuthenticator
client
- HTTP Clientcontext
- HTTP Contexttarget
- Target URI to which code wants to authenticateLicenced under the Apache License, Version 2.0