public class NTCredentials extends UsernamePasswordCredentials
Credentials for use with the NTLM authentication scheme which requires additional
information.| 构造器和说明 |
|---|
NTCredentials()
已过时。
Do not use. Null user name, domain & host no longer allowed
|
NTCredentials(String userName,
String password,
String host,
String domain)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o)
Performs a case-sensitive check to see if the components of the credentials
are the same.
|
String |
getDomain()
Retrieves the name to authenticate with.
|
String |
getHost()
Retrieves the host name of the computer originating the request.
|
int |
hashCode()
Computes a hash code based on all the case-sensitive parts of the credentials object.
|
void |
setDomain(String domain)
已过时。
Do not use. The NTCredentials objects should be immutable
|
void |
setHost(String host)
已过时。
Do not use. The NTCredentials objects should be immutable
|
String |
toString()
Return a string representation of this object.
|
getPassword, getUserName, setPassword, setUserNamepublic NTCredentials()
public NTCredentials(String userName, String password, String host, 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.host - The host the authentication request is originating from. Essentially, the
computer name for this machine.domain - The domain to authenticate within.public void setDomain(String domain)
domain - the NT domain to authenticate in.getDomain()public String getDomain()
setDomain(String)public void setHost(String host)
host - the Host the user is logged into.public String getHost()
public String toString()
toString 在类中 UsernamePasswordCredentialspublic int hashCode()
hashCode 在类中 UsernamePasswordCredentialspublic boolean equals(Object o)
equals 在类中 UsernamePasswordCredentialso - The object to match.true if all of the credentials match.Copyright © 2017. All rights reserved.