Package ucar.nc2.ui.widget
Class UrlAuthenticatorDialog
- java.lang.Object
-
- java.net.Authenticator
-
- ucar.nc2.ui.widget.UrlAuthenticatorDialog
-
- All Implemented Interfaces:
org.apache.http.client.CredentialsProvider
,HTTPCredentialsProvider
public class UrlAuthenticatorDialog extends Authenticator implements HTTPCredentialsProvider
This can be used both for java.net authentication: java.net.Authenticator.setDefault(new thredds.ui.UrlAuthenticatorDialog(frame));or for org.apache.http authentication: httpclient.getParams().setParameter( CredentialsProvider.PROVIDER, new UrlAuthenticatorDialog( null));
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.net.Authenticator
Authenticator.RequestorType
-
-
Field Summary
Fields Modifier and Type Field Description HTTPSession
session
-
Constructor Summary
Constructors Constructor Description UrlAuthenticatorDialog(JFrame parent)
constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
org.apache.http.auth.Credentials
getCredentials(org.apache.http.auth.AuthScope scope)
protected PasswordAuthentication
getPasswordAuthentication()
void
remove(org.apache.http.HttpHost host)
void
setCredentials(org.apache.http.auth.AuthScope scope, org.apache.http.auth.Credentials cred)
-
Methods inherited from class java.net.Authenticator
getDefault, getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthenticationInstance, setDefault
-
-
-
-
Field Detail
-
session
public HTTPSession session
-
-
Constructor Detail
-
UrlAuthenticatorDialog
public UrlAuthenticatorDialog(JFrame parent)
constructor- Parameters:
parent
- JFrame
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clear
in interfaceorg.apache.http.client.CredentialsProvider
-
remove
public void remove(org.apache.http.HttpHost host)
- Specified by:
remove
in interfaceHTTPCredentialsProvider
-
setCredentials
public void setCredentials(org.apache.http.auth.AuthScope scope, org.apache.http.auth.Credentials cred)
- Specified by:
setCredentials
in interfaceorg.apache.http.client.CredentialsProvider
-
getPasswordAuthentication
protected PasswordAuthentication getPasswordAuthentication()
- Overrides:
getPasswordAuthentication
in classAuthenticator
-
getCredentials
public org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope scope)
- Specified by:
getCredentials
in interfaceorg.apache.http.client.CredentialsProvider
-
-