Package uk.ac.starlink.auth
Class UserPass
java.lang.Object
uk.ac.starlink.auth.UserPass
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
char[]
Returns the password.Returns the username.int
hashCode()
-
Constructor Details
-
UserPass
Constructor.- Parameters:
username
- user namepassword
- password
-
-
Method Details
-
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() -
equals
-