@Contract(threading=IMMUTABLE) public class UsernamePasswordCredentials extends Object implements Credentials, Serializable
Credentials representation based on a user name / password
 pair.| Constructor and Description | 
|---|
| UsernamePasswordCredentials(Principal principal,
                           char[] password)The constructor with the username and password arguments. | 
| UsernamePasswordCredentials(String username,
                           char[] password)The constructor with the username and password arguments. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o) | 
| char[] | getPassword()Deprecated. 
 Use  getUserPassword(). | 
| String | getUserName() | 
| char[] | getUserPassword() | 
| Principal | getUserPrincipal() | 
| int | hashCode() | 
| String | toString() | 
public UsernamePasswordCredentials(Principal principal, char[] password)
principal - the user principalpassword - the passwordBasicUserPrincipal, 
NTUserPrincipalpublic UsernamePasswordCredentials(String username, char[] password)
username - the user namepassword - the passwordpublic Principal getUserPrincipal()
getUserPrincipal in interface Credentialspublic String getUserName()
public char[] getUserPassword()
@Deprecated public char[] getPassword()
getUserPassword().getPassword in interface CredentialsCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.