public class AdapterResourceAuthenticator
extends java.net.Authenticator
This calls Authenticator.setDefault(Authenticator)
in a static block; when authentication is required, this will iterate
over the list of configured ResourceAuthenticator
instances and return the first non-null PasswordAuthentication
provided.
Classes that wish to provide an Authenticator
instance are encouraged to instead implement ResourceAuthenticator
and add to this instance using the addAuthenticator(ResourceAuthenticator)
and
removeAuthenticator(ResourceAuthenticator)
methods.
Modifier and Type | Method and Description |
---|---|
boolean |
addAuthenticator(ResourceAuthenticator a) |
java.util.Collection<ResourceAuthenticator> |
currentAuthenticators()
Return a cloned list of the current set of configured authenticators.
|
static AdapterResourceAuthenticator |
getInstance() |
protected java.net.PasswordAuthentication |
getPasswordAuthentication() |
boolean |
removeAuthenticator(ResourceAuthenticator a) |
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault
public static final AdapterResourceAuthenticator getInstance()
protected java.net.PasswordAuthentication getPasswordAuthentication()
getPasswordAuthentication
in class java.net.Authenticator
public boolean addAuthenticator(ResourceAuthenticator a)
public boolean removeAuthenticator(ResourceAuthenticator a)
public java.util.Collection<ResourceAuthenticator> currentAuthenticators()