Package org.apache.http.auth
Class NTCredentials
- java.lang.Object
 - 
- org.apache.http.auth.NTCredentials
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable,Credentials
@Contract(threading=IMMUTABLE) public class NTCredentials extends java.lang.Object implements Credentials, java.io.Serializable
Credentialsimplementation for Microsoft Windows platforms that includes Windows specific attributes such as name of the domain the user belongs to.- Since:
 - 4.0
 - See Also:
 - Serialized Form
 
 
- 
- 
Constructor Summary
Constructors Constructor Description NTCredentials(java.lang.String usernamePassword)Deprecated.(4.5) will be replaced withString,char[]in 5.0NTCredentials(java.lang.String userName, java.lang.String password, java.lang.String workstation, java.lang.String domain)Constructor. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetDomain()Retrieves the name to authenticate with.java.lang.StringgetPassword()java.lang.StringgetUserName()java.security.PrincipalgetUserPrincipal()java.lang.StringgetWorkstation()Retrieves the workstation name of the computer originating the request.inthashCode()java.lang.StringtoString() 
 - 
 
- 
- 
Constructor Detail
- 
NTCredentials
@Deprecated public NTCredentials(java.lang.String usernamePassword)
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
public NTCredentials(java.lang.String userName, java.lang.String password, java.lang.String workstation, java.lang.String domain)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 Detail
- 
getUserPrincipal
public java.security.Principal getUserPrincipal()
- Specified by:
 getUserPrincipalin interfaceCredentials
 
- 
getUserName
public java.lang.String getUserName()
 
- 
getPassword
public java.lang.String getPassword()
- Specified by:
 getPasswordin interfaceCredentials
 
- 
getDomain
public java.lang.String getDomain()
Retrieves the name to authenticate with.- Returns:
 - String the domain these credentials are intended to authenticate with.
 
 
- 
getWorkstation
public java.lang.String getWorkstation()
Retrieves the workstation name of the computer originating the request.- Returns:
 - String the workstation the user is logged into.
 
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -