|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.net.Authenticator
org.openvpms.esci.service.client.DefaultServiceAuthenticators
public class DefaultServiceAuthenticators
Default implementation of the ServiceAuthenticators
interface.
Authenticator.setDefault(java.net.Authenticator)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.net.Authenticator |
---|
Authenticator.RequestorType |
Method Summary | |
---|---|
void |
addAuthenticator(String url,
ServiceAuthenticator authenticator)
Registers an authenticator for a url. |
static DefaultServiceAuthenticators |
getInstance()
Returns the singleton instance. |
protected PasswordAuthentication |
getPasswordAuthentication()
Called when password authorization is needed. |
PasswordAuthentication |
getPasswordAuthentication(String host,
InetAddress site,
int port,
String protocol,
String prompt,
String scheme,
URL url,
Authenticator.RequestorType requestorType)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DefaultServiceAuthenticators getInstance()
public void addAuthenticator(String url, ServiceAuthenticator authenticator)
addAuthenticator
in interface ServiceAuthenticators
url
- the url to supply credentials forauthenticator
- the authenticatorprotected PasswordAuthentication getPasswordAuthentication()
getPasswordAuthentication
in class Authenticator
public PasswordAuthentication getPasswordAuthentication(String host, InetAddress site, int port, String protocol, String prompt, String scheme, URL url, Authenticator.RequestorType requestorType)
getPasswordAuthentication
in interface ServiceAuthenticator
host
- the host name of the site or proxy requesting authentication, or null if not availablesite
- the InetAddress of the site requesting authorization, or null if it's not availableport
- the port number for the requested connectionprotocol
- the protocol that's requesting the connection. Often this will be based on a URL, but in a
future JDK it could be, for example, "SOCKS" for a password-protected SOCKS5 firewall.prompt
- the prompt string given by the requestor (realm for http requests)scheme
- the scheme of the requestor (the HTTP scheme for an HTTP firewall, for example).url
- the URL that resulted in this request for authentication.requestorType
- authentication type of the requestor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |