@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.| Constructor and Description |
|---|
NTCredentials(String usernamePassword)
The constructor with the fully qualified username and password combined
string argument.
|
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() |
public NTCredentials(String usernamePassword)
usernamePassword - 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 Credentialspublic String getUserName()
public String getPassword()
getPassword in interface Credentialspublic String getDomain()
public String getWorkstation()
Copyright © 1999–2013 The Apache Software Foundation. All rights reserved.