home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / net / PasswordAuthentication.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  1.4 KB  |  63 lines

  1. /*
  2.  * @(#)PasswordAuthentication.java    1.4 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.net;
  16.  
  17.  
  18. /**
  19.  * The class PasswordAuthentication is a data holder that is used by
  20.  * Authenticator.  It is simply a repository for a user name and a password.
  21.  *
  22.  * @see java.net.Authenticator
  23.  * @see java.net.Authenticator#getPasswordAuthentication()
  24.  *
  25.  * @author  Bill Foote
  26.  * @version 1.4, 03/18/98
  27.  * @since   JDK1.2
  28.  */
  29.  
  30. public final class PasswordAuthentication {
  31.  
  32.     private String userName;
  33.     private String password;
  34.     
  35.  
  36.     /** 
  37.      * Initialize a new PasswordAuthentication
  38.      * @param userName the user name
  39.      * @param password The user's password
  40.      */
  41.     public PasswordAuthentication(String userName, String password) {
  42.     this.userName = userName;
  43.     this.password = password;
  44.     }
  45.  
  46.     /**
  47.      * @return the user name
  48.      */
  49.     public String getUserName() {
  50.     return userName;
  51.     }
  52.  
  53.     /**
  54.      * @return the password
  55.      */
  56.     public String getPassword() {
  57.     return password;
  58.     }
  59.  
  60.  
  61. }
  62.  
  63.