public class ScopedAuthenticator extends AbstractScopedAuthenticator<Pair<String,char[]>>
A credentials based authenticator where credentials are scoped to URIs. This allows for a single authenticator to present different credentials to different URIs as appropriate. Works with the basic and digest HTTP authentication schemes.
See ScopedNTAuthenticator
for an implementation that works for the
NTLM authentication scheme.
Constructor and Description |
---|
ScopedAuthenticator(Map<URI,Pair<String,char[]>> credentials)
Creates an authenticator with a set of credentials for URIs
|
ScopedAuthenticator(URI target,
String username,
char[] password)
Creates an authenticator with credentials for the given URI
|
Modifier and Type | Method and Description |
---|---|
void |
addCredentials(URI target,
String username,
char[] password)
Adds/Overwrites credentials for a given URI
|
apply, invalidate
Licenced under the Apache License, Version 2.0