Class JAuthenticator


  • public class JAuthenticator
    extends java.net.Authenticator
    This class is resposible for providing authentication information when needed by network protocols. It does this by poping up a small window that asks for User ID and password for the system.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.net.Authenticator

        java.net.Authenticator.RequestorType
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.swing.JButton cancelButton  
      protected javax.swing.JPasswordField JPassword  
      protected javax.swing.JTextField JUserID  
      static java.lang.String LABEL_CANCEL  
      static java.lang.String LABEL_OK  
      static java.lang.String LABEL_PASSWORD  
      static java.lang.String LABEL_REQ  
      static java.lang.String LABEL_SITE  
      static java.lang.String LABEL_USERID  
      protected javax.swing.JLabel label1  
      protected javax.swing.JLabel label2  
      protected javax.swing.JButton okButton  
      static java.lang.String TITLE
      Internationalization message string
      protected javax.swing.JDialog window  
    • Constructor Summary

      Constructors 
      Constructor Description
      JAuthenticator()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected javax.swing.JComponent buildAuthPanel()  
      protected javax.swing.JComponent buildButtonPanel()  
      java.net.PasswordAuthentication getPasswordAuthentication()
      This is called by the protocol stack when authentication is required.
      protected void initWindow()  
      • Methods inherited from class java.net.Authenticator

        getDefault, getRequestingHost, getRequestingPort, getRequestingPrompt, getRequestingProtocol, getRequestingScheme, getRequestingSite, getRequestingURL, getRequestorType, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthentication, requestPasswordAuthenticationInstance, setDefault
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • TITLE

        public static final java.lang.String TITLE
        Internationalization message string
        See Also:
        Constant Field Values
      • window

        protected javax.swing.JDialog window
      • cancelButton

        protected javax.swing.JButton cancelButton
      • okButton

        protected javax.swing.JButton okButton
      • label1

        protected javax.swing.JLabel label1
      • label2

        protected javax.swing.JLabel label2
      • JUserID

        protected javax.swing.JTextField JUserID
      • JPassword

        protected javax.swing.JPasswordField JPassword
    • Constructor Detail

      • JAuthenticator

        public JAuthenticator()
    • Method Detail

      • initWindow

        protected void initWindow()
      • buildAuthPanel

        protected javax.swing.JComponent buildAuthPanel()
      • buildButtonPanel

        protected javax.swing.JComponent buildButtonPanel()
      • getPasswordAuthentication

        public java.net.PasswordAuthentication getPasswordAuthentication()
        This is called by the protocol stack when authentication is required. We then show the dialog in the Swing event thread, and block waiting for the user to select either cancel or ok, at which point we get notified.
        Overrides:
        getPasswordAuthentication in class java.net.Authenticator