com.isti.util
Class UrlAuthenticator

java.lang.Object
  extended by java.net.Authenticator
      extended by com.isti.util.UrlAuthenticator
All Implemented Interfaces:
PasswordAuthenticator
Direct Known Subclasses:
UrlAuthenticatorDialog

public class UrlAuthenticator
extends java.net.Authenticator
implements PasswordAuthenticator

URL Authenticator


Nested Class Summary
 
Nested classes/interfaces inherited from class java.net.Authenticator
java.net.Authenticator.RequestorType
 
Constructor Summary
UrlAuthenticator(PasswordAuthenticator passwordAuthenticator)
          Create the URL authenticator.
 
Method Summary
 java.net.PasswordAuthentication getPasswordAuthentication()
          Called when when a password-protected URL is accessed.
static void setDefaultAuthenticator(java.net.Authenticator authenticator)
          Set the default authenticator.
 
Methods inherited from class java.net.Authenticator
getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, setDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlAuthenticator

public UrlAuthenticator(PasswordAuthenticator passwordAuthenticator)
Create the URL authenticator.

Parameters:
passwordAuthenticator - the password authenticator.
Method Detail

getPasswordAuthentication

public java.net.PasswordAuthentication getPasswordAuthentication()
Called when when a password-protected URL is accessed.

Specified by:
getPasswordAuthentication in interface PasswordAuthenticator
Overrides:
getPasswordAuthentication in class java.net.Authenticator
Returns:
the password authentication or null if none.

setDefaultAuthenticator

public static void setDefaultAuthenticator(java.net.Authenticator authenticator)
Set the default authenticator.

Parameters:
authenticator - the authenticator.