@Contract(threading=IMMUTABLE) public class NTCredentials extends java.lang.Object implements Credentials, java.io.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 java.lang.String |
password
Password
|
private NTUserPrincipal |
principal
The user principal
|
private static long |
serialVersionUID |
private java.lang.String |
workstation
The host the authentication request is originating from.
|
Constructor and Description |
---|
NTCredentials(java.lang.String usernamePassword)
Deprecated.
(4.5) will be replaced with
String , char[] in 5.0 |
NTCredentials(java.lang.String userName,
java.lang.String password,
java.lang.String workstation,
java.lang.String domain)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getDomain()
Retrieves the name to authenticate with.
|
java.lang.String |
getPassword() |
java.lang.String |
getUserName() |
java.security.Principal |
getUserPrincipal() |
java.lang.String |
getWorkstation()
Retrieves the workstation name of the computer originating the request.
|
int |
hashCode() |
java.lang.String |
toString() |
private static final long serialVersionUID
private final NTUserPrincipal principal
private final java.lang.String password
private final java.lang.String workstation
@Deprecated public NTCredentials(java.lang.String usernamePassword)
String
, char[]
in 5.0usernamePassword
- the domain/username:password formed stringpublic NTCredentials(java.lang.String userName, java.lang.String password, java.lang.String workstation, java.lang.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 java.security.Principal getUserPrincipal()
getUserPrincipal
in interface Credentials
public java.lang.String getUserName()
public java.lang.String getPassword()
getPassword
in interface Credentials
public java.lang.String getDomain()
public java.lang.String getWorkstation()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object