@Contract(threading=IMMUTABLE) public class UsernamePasswordCredentials extends Object implements Credentials, Serializable
Credentials representation based on a user name / password
pair.| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
char[] |
getPassword()
已过时。
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 在接口中 Credentialspublic String getUserName()
public char[] getUserPassword()
@Deprecated public char[] getPassword()
getUserPassword().getPassword 在接口中 CredentialsCopyright © 2023. All rights reserved.