Class UserPass

java.lang.Object
uk.ac.starlink.auth.UserPass

public class UserPass extends Object
Aggregates a username and password. The password is supplied, and should ideally be always manipulated, as an array of characters rather than a String for security reasons, following practice elsewhere in the J2SE. However the difference between using char[] and String is not all that great.
Since:
15 Jun 2020
Author:
Mark Taylor
  • Constructor Details

    • UserPass

      public UserPass(String username, char[] password)
      Constructor.
      Parameters:
      username - user name
      password - password
  • Method Details

    • getUsername

      public String getUsername()
      Returns the username.
      Returns:
      user name; may be zero length, but not null
    • getPassword

      public char[] getPassword()
      Returns the password.
      Returns:
      password; may be zero length, but not null
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object