public final class DefaultAuthenticator extends java.net.Authenticator
CredentialsManager.| Modifier and Type | Field and Description |
|---|---|
private boolean |
enabled |
private java.util.Collection<Pair<java.lang.String,java.net.Authenticator.RequestorType>> |
failedCredentials |
private static DefaultAuthenticator |
INSTANCE |
| Modifier | Constructor and Description |
|---|---|
private |
DefaultAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addFailedCredentialHost(java.lang.String host)
Marks for this host that the authentication failed, i.e.,
the
CredentialsManager will show a dialog at the next time. |
static DefaultAuthenticator |
getInstance()
Returns the unique instance
|
protected java.net.PasswordAuthentication |
getPasswordAuthentication()
Called by the Java HTTP stack when either the OSM API server or a proxy requires authentication.
|
boolean |
isEnabled()
Determines whether this authenticator is enabled, i.e.,
provides
password authentication via CredentialsManager. |
boolean |
removeFailedCredentialHost(java.lang.String host)
Un-marks the failed authentication attempt for the host
|
void |
setEnabled(boolean enabled)
Enabled/disables this authenticator, i.e., decides whether it
should provide
password authentication via CredentialsManager. |
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefaultprivate static final DefaultAuthenticator INSTANCE
private final java.util.Collection<Pair<java.lang.String,java.net.Authenticator.RequestorType>> failedCredentials
private boolean enabled
private DefaultAuthenticator()
public static DefaultAuthenticator getInstance()
protected java.net.PasswordAuthentication getPasswordAuthentication()
getPasswordAuthentication in class java.net.Authenticatorpublic boolean isEnabled()
password authentication via CredentialsManager.public void setEnabled(boolean enabled)
password authentication via CredentialsManager.enabled - whether this authenticator should be enabledpublic boolean addFailedCredentialHost(java.lang.String host)
CredentialsManager will show a dialog at the next time.host - the host to markCollection.add(Object)public boolean removeFailedCredentialHost(java.lang.String host)
host - the host to un-markCollection.remove(Object)