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.
NTLM is a proprietary authentication scheme developed by Microsoft
and optimized for Windows platforms.
- Since:
- 4.0
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDeprecated.private NTCredentialsDeprecated.private final NTLMEngineDeprecated.private static final org.slf4j.LoggerDeprecated.private NTLMScheme.StateDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateAuthResponse(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context) Deprecated.Generates an authorization response based on the current state.getName()Deprecated.Returns textual designation of the given authentication scheme.Deprecated.ReturnsPrincipalwhose credentials are used to generate an authentication response.getRealm()Deprecated.Returns authentication realm.booleanDeprecated.Authentication process may involve a series of challenge-response exchanges.booleanDeprecated.Determines if the authentication scheme is expected to provide an authorization response on a per connection basis instead of the standard per request basisbooleanisResponseReady(org.apache.hc.core5.http.HttpHost host, CredentialsProvider credentialsProvider, org.apache.hc.core5.http.protocol.HttpContext context) Deprecated.Determines whether or not an authorization response can be generated based on the actual authentication state.voidprocessChallenge(AuthChallenge authChallenge, org.apache.hc.core5.http.protocol.HttpContext context) Deprecated.Processes the given auth challenge.toString()Deprecated.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOGDeprecated. -
engine
Deprecated. -
state
Deprecated. -
challenge
Deprecated. -
credentials
Deprecated.
-
-
Constructor Details
-
NTLMScheme
Deprecated. -
NTLMScheme
public NTLMScheme()Deprecated.- Since:
- 4.3
-
-
Method Details
-
getName
Deprecated.Description copied from interface:AuthSchemeReturns textual designation of the given authentication scheme.- Specified by:
getNamein interfaceAuthScheme- Returns:
- the name of the given authentication scheme
-
isConnectionBased
public boolean isConnectionBased()Deprecated.Description copied from interface:AuthSchemeDetermines 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:
isConnectionBasedin interfaceAuthScheme- Returns:
trueif the scheme is connection based,falseif the scheme is request based.
-
getRealm
Deprecated.Description copied from interface:AuthSchemeReturns authentication realm. If the concept of an authentication realm is not applicable to the given authentication scheme, returnsnull.- Specified by:
getRealmin interfaceAuthScheme- Returns:
- the authentication realm
-
processChallenge
public void processChallenge(AuthChallenge authChallenge, org.apache.hc.core5.http.protocol.HttpContext context) throws MalformedChallengeException Deprecated.Description copied from interface:AuthSchemeProcesses 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:
processChallengein interfaceAuthScheme- Parameters:
authChallenge- the auth challengecontext- HTTP context- Throws:
MalformedChallengeException- in case the auth challenge is incomplete, malformed or otherwise invalid.
-
isResponseReady
public boolean isResponseReady(org.apache.hc.core5.http.HttpHost host, CredentialsProvider credentialsProvider, org.apache.hc.core5.http.protocol.HttpContext context) throws AuthenticationException Deprecated.Description copied from interface:AuthSchemeDetermines 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:
isResponseReadyin interfaceAuthScheme- Parameters:
credentialsProvider- The credentials to be used for authenticationcontext- HTTP context- Returns:
trueif an authorization response can be generated and the authentication handshake can proceed,falseotherwise.- Throws:
AuthenticationException- if authorization string cannot be generated due to an authentication failure
-
getPrincipal
Deprecated.Description copied from interface:AuthSchemeReturnsPrincipalwhose credentials are used to generate an authentication response. Connection based schemes are required to return a userPrincipalif authorization applies to for the entire life span of connection.- Specified by:
getPrincipalin interfaceAuthScheme- Returns:
- user principal
- See Also:
-
generateAuthResponse
public String generateAuthResponse(org.apache.hc.core5.http.HttpHost host, org.apache.hc.core5.http.HttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context) throws AuthenticationException Deprecated.Description copied from interface:AuthSchemeGenerates an authorization response based on the current state. Some authentication schemes may need to load user credentials required to generate an authorization response from aCredentialsProviderprior to this method call.- Specified by:
generateAuthResponsein interfaceAuthScheme- Parameters:
request- The request being authenticatedcontext- HTTP context- Returns:
- authorization header
- Throws:
AuthenticationException- if authorization string cannot be generated due to an authentication failure- See Also:
-
isChallengeComplete
public boolean isChallengeComplete()Deprecated.Description copied from interface:AuthSchemeAuthentication 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:
isChallengeCompletein interfaceAuthScheme- Returns:
trueif the authentication process has been completed,falseotherwise.
-
toString
Deprecated.
-