org.apache.hc.client5.http.impl.auth

## Class NTLMScheme

- java.lang.Object
- - org.apache.hc.client5.http.impl.auth.NTLMScheme

All Implemented Interfaces:
  AuthScheme

Deprecated.
Do not use. the NTLM authentication scheme is no longer supported. Consider using Basic or Bearer authentication with TLS instead.

    @Deprecated
    public final class NTLMScheme
    extends Object
    implements AuthScheme

NTLM is a proprietary authentication scheme developed by Microsoft and optimized for Windows platforms.

Since:
  4.0
See Also:
  `BasicScheme`, `BearerScheme`

### Constructor Summary

Constructors
Constructor and Description
`NTLMScheme()` Deprecated.
`NTLMScheme(NTLMEngine engine)` Deprecated.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`String` `generateAuthResponse(HttpHost host, HttpRequest request, HttpContext context)` Deprecated. Generates an authorization response based on the current state.
`String` `getName()` Deprecated. Returns textual designation of the given authentication scheme.
`Principal` `getPrincipal()` Deprecated. Returns `Principal` whose credentials are used to generate an authentication response.
`String` `getRealm()` Deprecated. Returns authentication realm.
`boolean` `isChallengeComplete()` Deprecated. Authentication process may involve a series of challenge-response exchanges.
`boolean` `isConnectionBased()` Deprecated. Determines if the authentication scheme is expected to provide an authorization response on a per connection basis instead of the standard per request basis
`boolean` `isResponseReady(HttpHost host, CredentialsProvider credentialsProvider, HttpContext context)` Deprecated. Determines whether or not an authorization response can be generated based on the actual authentication state.
`void` `processChallenge(AuthChallenge authChallenge, HttpContext context)` Deprecated. Processes the given auth challenge.
`String` `toString()` Deprecated.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### NTLMScheme

    public NTLMScheme(NTLMEngine engine)

Deprecated.

#### NTLMScheme

    public NTLMScheme()

Deprecated.

Since:
  4.3

### Method Detail

#### getName

    public String getName()

Deprecated.
Description copied from interface: `AuthScheme`
Returns textual designation of the given authentication scheme.

Specified by:
  `getName` in interface `AuthScheme`
Returns:
  the name of the given authentication scheme

#### isConnectionBased

    public boolean isConnectionBased()

Deprecated.
Description copied from interface: `AuthScheme`
Determines if the authentication scheme is expected to provide an authorization response on a per connection basis instead of the standard per request basis

Specified by:
  `isConnectionBased` in interface `AuthScheme`
Returns:
  `true` if the scheme is connection based, `false` if the scheme is request based.

#### getRealm

    public String getRealm()

Deprecated.
Description copied from interface: `AuthScheme`
Returns authentication realm. If the concept of an authentication realm is not applicable to the given authentication scheme, returns `null`.

Specified by:
  `getRealm` in interface `AuthScheme`
Returns:
  the authentication realm

#### processChallenge

    public void processChallenge(AuthChallenge authChallenge,
                                 HttpContext context)
                          throws MalformedChallengeException

Deprecated.
Description copied from interface: `AuthScheme`
Processes the given auth challenge. Some authentication schemes may involve multiple challenge-response exchanges. Such schemes must be able to maintain internal state when dealing with sequential challenges

Specified by:
  `processChallenge` in interface `AuthScheme`
Parameters:
  `authChallenge` - the auth challenge
  `context` - HTTP context
Throws:
  `MalformedChallengeException` - in case the auth challenge is incomplete, malformed or otherwise invalid.

#### isResponseReady

    public boolean isResponseReady(HttpHost host,
                                   CredentialsProvider credentialsProvider,
                                   HttpContext context)
                            throws AuthenticationException

Deprecated.
Description copied from interface: `AuthScheme`
Determines whether or not an authorization response can be generated based on the actual authentication state. Generally the outcome of this method will depend upon availability of user credentials necessary to produce an authorization response.

Specified by:
  `isResponseReady` in interface `AuthScheme`
  `credentialsProvider` - The credentials to be used for authentication
  `context` - HTTP context
Returns:
  `true` if an authorization response can be generated and the authentication handshake can proceed, `false` otherwise.
Throws:
  `AuthenticationException` - if authorization string cannot be generated due to an authentication failure

#### getPrincipal

    public Principal getPrincipal()

Deprecated.
Description copied from interface: `AuthScheme`
Returns `Principal` whose credentials are used to generate an authentication response. Connection based schemes are required to return a user `Principal` if authorization applies to for the entire life span of connection.

Specified by:
  `getPrincipal` in interface `AuthScheme`
Returns:
  user principal
See Also:
  `AuthScheme.isConnectionBased()`

#### generateAuthResponse

    public String generateAuthResponse(HttpHost host,
                                       HttpRequest request,
                                       HttpContext context)
                                throws AuthenticationException

Deprecated.
Description copied from interface: `AuthScheme`
Generates an authorization response based on the current state. Some authentication schemes may need to load user credentials required to generate an authorization response from a `CredentialsProvider` prior to this method call.

Specified by:
  `generateAuthResponse` in interface `AuthScheme`
  `request` - The request being authenticated
  `context` - HTTP context
Returns:
  authorization header
Throws:
  `AuthenticationException` - if authorization string cannot be generated due to an authentication failure
See Also:
  `AuthScheme.isResponseReady(HttpHost, CredentialsProvider, HttpContext)`

#### isChallengeComplete

    public boolean isChallengeComplete()

Deprecated.
Description copied from interface: `AuthScheme`
Authentication process may involve a series of challenge-response exchanges. This method tests if the authorization process has been fully completed (either successfully or unsuccessfully), that is, all the required authorization challenges have been processed in their entirety.

Specified by:
  `isChallengeComplete` in interface `AuthScheme`
Returns:
  `true` if the authentication process has been completed, `false` otherwise.

#### toString

    public String toString()

Deprecated.

Overrides:
  `toString` in class `Object`