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,ucar.httpservices.HTTPCredentialsProvider
public class UrlAuthenticatorDialog extends Authenticator implements ucar.httpservices.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 ucar.httpservices.HTTPSessionsession
-
Constructor Summary
Constructors Constructor Description UrlAuthenticatorDialog(JFrame parent)constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()org.apache.http.auth.CredentialsgetCredentials(org.apache.http.auth.AuthScope scope)protected PasswordAuthenticationgetPasswordAuthentication()voidremove(org.apache.http.HttpHost host)voidsetCredentials(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
-
-
-
-
Constructor Detail
-
UrlAuthenticatorDialog
public UrlAuthenticatorDialog(JFrame parent)
constructor- Parameters:
parent- JFrame
-
-
Method Detail
-
clear
public void clear()
- Specified by:
clearin interfaceorg.apache.http.client.CredentialsProvider
-
remove
public void remove(org.apache.http.HttpHost host)
- Specified by:
removein interfaceucar.httpservices.HTTPCredentialsProvider
-
setCredentials
public void setCredentials(org.apache.http.auth.AuthScope scope, org.apache.http.auth.Credentials cred)- Specified by:
setCredentialsin interfaceorg.apache.http.client.CredentialsProvider
-
getPasswordAuthentication
protected PasswordAuthentication getPasswordAuthentication()
- Overrides:
getPasswordAuthenticationin classAuthenticator
-
getCredentials
public org.apache.http.auth.Credentials getCredentials(org.apache.http.auth.AuthScope scope)
- Specified by:
getCredentialsin interfaceorg.apache.http.client.CredentialsProvider
-
-