Package org.apache.hc.client5.http.auth
Class NTCredentials
- java.lang.Object
-
- org.apache.hc.client5.http.auth.NTCredentials
-
- All Implemented Interfaces:
java.io.Serializable,Credentials
@Deprecated @Contract(threading=IMMUTABLE) public class NTCredentials extends java.lang.Object implements Credentials, java.io.Serializable
Deprecated.Do not use. the NTLM authentication scheme is no longer supported. Consider using Basic or Bearer authentication with TLS instead.Microsoft Windows specificCredentialsrepresentation that includes Windows specific attributes such as name of the domain the user belongs to.- Since:
- 4.0
- See Also:
UsernamePasswordCredentials,BearerToken, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NTCredentials(char[] password, java.lang.String userName, java.lang.String domain, java.lang.String netbiosDomain)Deprecated.Constructor to create an instance of NTCredentials.NTCredentials(java.lang.String userName, char[] password, java.lang.String workstation, java.lang.String domain)Deprecated.Constructor.NTCredentials(java.lang.String userName, char[] password, java.lang.String workstation, java.lang.String domain, java.lang.String netbiosDomain)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Deprecated.java.lang.StringgetDomain()Deprecated.Retrieves the name to authenticate with.java.lang.StringgetNetbiosDomain()Deprecated.Retrieves the netbios domain to authenticate with.char[]getPassword()Deprecated.java.lang.StringgetUserName()Deprecated.java.security.PrincipalgetUserPrincipal()Deprecated.java.lang.StringgetWorkstation()Deprecated.Retrieves the netbios workstation name of the computer originating the request.inthashCode()Deprecated.java.lang.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
NTCredentials
public NTCredentials(java.lang.String userName, char[] password, java.lang.String workstation, java.lang.String domain)Deprecated.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.
-
NTCredentials
public NTCredentials(java.lang.String userName, char[] password, java.lang.String workstation, java.lang.String domain, java.lang.String netbiosDomain)Deprecated.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 netbios workstation name that the authentication request is originating from. Essentially, the computer name for this machine.domain- The domain to authenticate within.netbiosDomain- The netbios version of the domain name.
-
NTCredentials
public NTCredentials(char[] password, java.lang.String userName, java.lang.String domain, java.lang.String netbiosDomain)Deprecated.Constructor to create an instance of NTCredentials.- Parameters:
password- The password to use for authentication. Must not be null.userName- The user name for authentication. This should not include the domain to authenticate with. For example: "user" is correct whereas "DOMAIN\user" is not. Must not be null.domain- The domain to authenticate within. Can be null.netbiosDomain- An alternative representation of the domain name in NetBIOS format. Can be null. This parameter is provided to accommodate specific scenarios that require the NetBIOS version of the domain name.This constructor creates a new instance of NTCredentials, determining the workstation name at runtime using the
getWorkstationName()method. The workstation name will be converted to uppercase using theLocale.ROOTlocale.
-
-
Method Detail
-
getUserPrincipal
public java.security.Principal getUserPrincipal()
Deprecated.- Specified by:
getUserPrincipalin interfaceCredentials
-
getUserName
public java.lang.String getUserName()
Deprecated.
-
getPassword
public char[] getPassword()
Deprecated.- Specified by:
getPasswordin interfaceCredentials
-
getDomain
public java.lang.String getDomain()
Deprecated.Retrieves the name to authenticate with.- Returns:
- String the domain these credentials are intended to authenticate with.
-
getNetbiosDomain
public java.lang.String getNetbiosDomain()
Deprecated.Retrieves the netbios domain to authenticate with.- Returns:
- String the netbios domain name.
-
getWorkstation
public java.lang.String getWorkstation()
Deprecated.Retrieves the netbios workstation name of the computer originating the request.- Returns:
- String the netbios workstation the user is logged into.
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-