public class

NTCredentials

extends Object
implements Serializable Credentials
java.lang.Object
   ↳ org.apache.http.auth.NTCredentials

Class Overview

Credentials implementation for Microsoft Windows platforms that includes Windows specific attributes such as name of the domain the user belongs to.

Summary

Public Constructors
NTCredentials(String usernamePassword)
The constructor with the fully qualified username and password combined string argument.
NTCredentials(String userName, String password, String workstation, String domain)
Constructor.
Public Methods
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()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.auth.Credentials

Public Constructors

public NTCredentials (String usernamePassword)

Also: HttpClient

The constructor with the fully qualified username and password combined string argument.

Parameters
usernamePassword the domain/username:password formed string

public NTCredentials (String userName, String password, String workstation, String domain)

Also: HttpClient

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.

Public Methods

public boolean equals (Object o)

public String getDomain ()

Also: HttpClient

Retrieves the name to authenticate with.

Returns
  • String the domain these credentials are intended to authenticate with.

public String getPassword ()

Also: HttpClient

public String getUserName ()

Also: HttpClient

public Principal getUserPrincipal ()

Also: HttpClient

public String getWorkstation ()

Also: HttpClient

Retrieves the workstation name of the computer originating the request.

Returns
  • String the workstation the user is logged into.

public int hashCode ()

public String toString ()