1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.mail;
  6. /**
  7. * The class PasswordAuthentication is a data holder that is used by
  8. * Authenticator. It is simply a repository for a user name and a password.
  9. *
  10. * @see java.net.PasswordAuthentication
  11. * @see javax.mail.Authenticator
  12. * @see javax.mail.Authenticator#getPasswordAuthentication()
  13. *
  14. * @author Bill Foote
  15. * @version 1.3, 12/06/99
  16. */
  17. public final class PasswordAuthentication {
  18. private String userName;
  19. private String password;
  20. /**
  21. * Initialize a new PasswordAuthentication
  22. * @param userName the user name
  23. * @param password The user's password
  24. */
  25. public PasswordAuthentication(String userName, String password) {
  26. this.userName = userName;
  27. this.password = password;
  28. }
  29. /**
  30. * @return the user name
  31. */
  32. public String getUserName() {
  33. return userName;
  34. }
  35. /**
  36. * @return the password
  37. */
  38. public String getPassword() {
  39. return password;
  40. }
  41. }