Deprecated
Do not use. the NTLM authentication scheme is no longer supported. Consider using Basic or Bearer authentication with TLS instead.
Credentials representation that includes
Windows specific attributes such as name of the domain the user belongs to.
UsernamePasswordCredentials, BearerToken
| Modifier and Type | Field and Description |
|---|---|
| private final String | netbiosDomain
The netbios domain the authentication request is against |
| private final char[] | password
Password |
| private final NTUserPrincipal | principal
The user principal |
| private static final long | |
| private final String | workstation
The netbios hostname the authentication request is originating from. |
| Access | Constructor and Description |
|---|---|
| public | NTCredentials(final String
The user name. This should not include the domain to authenticate with.
For example: "user" is correct whereas "DOMAIN\user" is not. userName, final char[] The password. password, final String The workstation the authentication request is originating from.
Essentially, the computer name for this machine. workstation, final String The domain to authenticate within. domain)Constructor. |
| public | NTCredentials(final String
The user name. This should not include the domain to authenticate with.
For example: "user" is correct whereas "DOMAIN\user" is not. userName, final char[] The password. password, final String The netbios workstation name that the authentication request is originating from.
Essentially, the computer name for this machine. workstation, final String The domain to authenticate within. domain, final String The netbios version of the domain name. netbiosDomain)Constructor. |
| public | NTCredentials(final char[]
The password to use for authentication. Must not be null. password, final String 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. userName, final String The domain to authenticate within. Can be null. domain, final String 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.
netbiosDomain)
This constructor creates a new instance of NTCredentials, determining the workstation name at runtime
using the Constructor to create an instance of NTCredentials. |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public boolean | equals(final Object
the reference object with which to compare. o)Overrides java. |
| public String | Returns: String the domain these credentials are intended to authenticate with.Retrieves the name to authenticate with. |
| public String | Returns: String the netbios domain name.Retrieves the netbios domain to authenticate with. |
| public char[] | |
| public String | |
| public Principal | |
| public String | Returns: String the netbios workstation the user is logged into.Retrieves the netbios workstation name of the computer originating the request. |
| private static String | Returns: The unqualified workstation name as a String.Retrieves the workstation name of the computer originating the request. |
| public int | |
| private static String | |
| public String |
| netbiosDomain | back to summary |
|---|---|
| private final String netbiosDomain The netbios domain the authentication request is against | |
| password | back to summary |
|---|---|
| private final char[] password Password | |
| principal | back to summary |
|---|---|
| private final NTUserPrincipal principal The user principal | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| workstation | back to summary |
|---|---|
| private final String workstation The netbios hostname the authentication request is originating from. | |
| NTCredentials | back to summary |
|---|---|
| public NTCredentials(final String userName, final char[] password, final String workstation, final String domain) Constructor.
| |
| NTCredentials | back to summary |
|---|---|
| public NTCredentials(final String userName, final char[] password, final String workstation, final String domain, final String netbiosDomain) Constructor.
| |
| NTCredentials | back to summary |
|---|---|
| public NTCredentials(final char[] password, final String userName, final String domain, final String netbiosDomain) Constructor to create an instance of NTCredentials.
| |
| convertDomain | back to summary |
|---|---|
| private static String convertDomain(final String domain) Convert domain to standard form | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDomain | back to summary |
|---|---|
| public String getDomain() Retrieves the name to authenticate with.
| |
| getNetbiosDomain | back to summary |
|---|---|
| public String getNetbiosDomain() Retrieves the netbios domain to authenticate with.
| |
| getPassword | back to summary |
|---|---|
| public char[] getPassword() Implements org.
| |
| getUserName | back to summary |
|---|---|
| public String getUserName() | |
| getUserPrincipal | back to summary |
|---|---|
| public Principal getUserPrincipal() Implements org.
| |
| getWorkstation | back to summary |
|---|---|
| public String getWorkstation() Retrieves the netbios workstation name of the computer originating the request.
| |
| getWorkstationName | back to summary |
|---|---|
| private static String getWorkstationName() Retrieves the workstation name of the computer originating the request. This method attempts to get the local host name using the InetAddress class. If it fails to retrieve the host name due to an UnknownHostException, it returns "localhost" as a fallback.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| stripDotSuffix | back to summary |
|---|---|
| private static String stripDotSuffix(final String value) Strip dot suffix from a name | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |