Package ipsk.net

Class SimplePasswordAuthentication


  • public class SimplePasswordAuthentication
    extends java.net.Authenticator
    Stores and provides username and password for network authentication.
    Author:
    K.Jaensch, klausj@phonetik.uni-muenchen.de
    • Nested Class Summary

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

        java.net.Authenticator.RequestorType
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getPassword()
      Gets current password.
      protected java.net.PasswordAuthentication getPasswordAuthentication()
      Gets password authentication.
      char[] getPasswordChars()  
      java.lang.String getUsername()
      Gets current user name.
      void setPassword​(java.lang.String string)
      Sets password.
      void setUsername​(java.lang.String string)
      Sets user name.
      • 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
    • Constructor Detail

      • SimplePasswordAuthentication

        public SimplePasswordAuthentication​(java.lang.String username,
                                            java.lang.String password)
        Creates new password authentication.
        Parameters:
        username - the username for authentication
        password - the password for authentication
      • SimplePasswordAuthentication

        public SimplePasswordAuthentication​(java.lang.String username,
                                            char[] password)
    • Method Detail

      • getPasswordAuthentication

        protected java.net.PasswordAuthentication getPasswordAuthentication()
        Gets password authentication.
        Overrides:
        getPasswordAuthentication in class java.net.Authenticator
        Returns:
        PasswordAuthentication password authentication
      • getPassword

        public java.lang.String getPassword()
        Gets current password.
        Returns:
        curent password
      • getPasswordChars

        public char[] getPasswordChars()
      • getUsername

        public java.lang.String getUsername()
        Gets current user name.
        Returns:
        user name
      • setPassword

        public void setPassword​(java.lang.String string)
        Sets password.
        Parameters:
        string - password
      • setUsername

        public void setUsername​(java.lang.String string)
        Sets user name.
        Parameters:
        string - user name