Package org.apache.http.auth
Class NTCredentials
java.lang.Object
org.apache.http.auth.NTCredentials
- All Implemented Interfaces:
Serializable
,Credentials
@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.- Since:
- 4.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNTCredentials
(String usernamePassword) Deprecated.NTCredentials
(String userName, String password, String workstation, String domain) Constructor. -
Method Summary
-
Constructor Details
-
NTCredentials
Deprecated.(4.5) will be replaced withString
,char[]
in 5.0The constructor with the fully qualified username and password combined string argument.- Parameters:
usernamePassword
- the domain/username:password formed string
-
NTCredentials
Constructor.- Parameters:
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.
-
-
Method Details
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfaceCredentials
-
getUserName
-
getPassword
- Specified by:
getPassword
in interfaceCredentials
-
getDomain
Retrieves the name to authenticate with.- Returns:
- String the domain these credentials are intended to authenticate with.
-
getWorkstation
Retrieves the workstation name of the computer originating the request.- Returns:
- String the workstation the user is logged into.
-
hashCode
public int hashCode() -
equals
-
toString
-
String
,char[]
in 5.0