@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.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() |
@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()
Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.