@Contract(threading=IMMUTABLE) public class NTCredentials extends Object implements Credentials, Serializable
Credentials
implementation for Microsoft Windows platforms that includes
Windows specific attributes such as name of the domain the user belongs to.Modifier and Type | Field and Description |
---|---|
private String |
password
Password
|
private NTUserPrincipal |
principal
The user principal
|
private static long |
serialVersionUID |
private String |
workstation
The host the authentication request is originating from.
|
Constructor and Description |
---|
NTCredentials(String usernamePassword)
Deprecated.
(4.5) will be replaced with
String , char[] in 5.0 |
NTCredentials(String userName,
String password,
String workstation,
String domain)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getDomain()
Retrieves the name to authenticate with.
|
String |
getPassword() |
String |
getUserName() |
Principal |
getUserPrincipal() |
String |
getWorkstation()
Retrieves the workstation name of the computer originating the request.
|
int |
hashCode() |
String |
toString() |
private static final long serialVersionUID
private final NTUserPrincipal principal
private final String workstation
@Deprecated public NTCredentials(String usernamePassword)
String
, char[]
in 5.0usernamePassword
- the domain/username:password formed stringpublic NTCredentials(String userName, String 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 Principal getUserPrincipal()
getUserPrincipal
in interface Credentials
public String getUserName()
public String getPassword()
getPassword
in interface Credentials
public String getDomain()
public String getWorkstation()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses