@Contract(threading=IMMUTABLE) public class UsernamePasswordCredentials extends Object implements Credentials, Serializable
Credentials
implementation based on a user name / password
pair.Modifier and Type | Field and Description |
---|---|
private String |
password |
private BasicUserPrincipal |
principal |
private static long |
serialVersionUID |
Constructor and Description |
---|
UsernamePasswordCredentials(String usernamePassword)
Deprecated.
(4.5) will be replaced with
String , char[] in 5.0 |
UsernamePasswordCredentials(String userName,
String password)
The constructor with the username and password arguments.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getPassword() |
String |
getUserName() |
Principal |
getUserPrincipal() |
int |
hashCode() |
String |
toString() |
private static final long serialVersionUID
private final BasicUserPrincipal principal
@Deprecated public UsernamePasswordCredentials(String usernamePassword)
String
, char[]
in 5.0usernamePassword
- the username:password formed stringtoString()
public UsernamePasswordCredentials(String userName, String password)
userName
- the user namepassword
- the passwordpublic Principal getUserPrincipal()
getUserPrincipal
in interface Credentials
public String getUserName()
public String getPassword()
getPassword
in interface Credentials
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses