@Deprecated @Contract(threading=IMMUTABLE) public class NTCredentials extends Object implements Credentials, Serializable
Credentials representation that includes
Windows specific attributes such as name of the domain the user belongs to.UsernamePasswordCredentials,
BearerToken,
序列化表格| 构造器和说明 |
|---|
NTCredentials(char[] password,
String userName,
String domain,
String netbiosDomain)
已过时。
Constructor to create an instance of NTCredentials.
|
NTCredentials(String userName,
char[] password,
String workstation,
String domain)
已过时。
Constructor.
|
NTCredentials(String userName,
char[] password,
String workstation,
String domain,
String netbiosDomain)
已过时。
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o)
已过时。
|
String |
getDomain()
已过时。
Retrieves the name to authenticate with.
|
String |
getNetbiosDomain()
已过时。
Retrieves the netbios domain to authenticate with.
|
char[] |
getPassword()
已过时。
|
String |
getUserName()
已过时。
|
Principal |
getUserPrincipal()
已过时。
|
String |
getWorkstation()
已过时。
Retrieves the netbios workstation name of the computer originating the request.
|
int |
hashCode()
已过时。
|
String |
toString()
已过时。
|
public NTCredentials(String userName, char[] password, String workstation, String domain)
userName - The user name. This should not include the domain to authenticate with.
For example: "user" is correct whereas "DOMAIN\user" is not.password - The password.workstation - The workstation the authentication request is originating from.
Essentially, the computer name for this machine.domain - The domain to authenticate within.public NTCredentials(String userName, char[] password, String workstation, String domain, String netbiosDomain)
userName - The user name. This should not include the domain to authenticate with.
For example: "user" is correct whereas "DOMAIN\user" is not.password - The password.workstation - The netbios workstation name that the authentication request is originating from.
Essentially, the computer name for this machine.domain - The domain to authenticate within.netbiosDomain - The netbios version of the domain name.public NTCredentials(char[] password,
String userName,
String domain,
String netbiosDomain)
password - The password to use for authentication. Must not be null.userName - The user name for authentication. This should not include the domain to authenticate with.
For example: "user" is correct whereas "DOMAIN\user" is not. Must not be null.domain - The domain to authenticate within. Can be null.netbiosDomain - An alternative representation of the domain name in NetBIOS format. Can be null.
This parameter is provided to accommodate specific scenarios that require the NetBIOS version of the domain name.
This constructor creates a new instance of NTCredentials, determining the workstation name at runtime
using the getWorkstationName() method. The workstation name will be converted to uppercase
using the Locale.ROOT locale.
public Principal getUserPrincipal()
getUserPrincipal 在接口中 Credentialspublic String getUserName()
public char[] getPassword()
getPassword 在接口中 Credentialspublic String getDomain()
public String getNetbiosDomain()
public String getWorkstation()
Copyright © 2023. All rights reserved.