public class NTLMScheme extends Object implements AuthScheme
| Constructor and Description |
|---|
NTLMScheme()
Default constructor for the NTLM authentication scheme.
|
NTLMScheme(String challenge)
Constructor for the NTLM authentication scheme.
|
| Modifier and Type | Method and Description |
|---|---|
String |
authenticate(Credentials credentials,
HttpMethod method)
Produces NTLM authorization string for the given set of
Credentials. |
String |
authenticate(Credentials credentials,
String method,
String uri)
Deprecated.
|
static String |
authenticate(NTCredentials credentials,
String challenge)
Deprecated.
Use non-static
authenticate(Credentials, HttpMethod) |
static String |
authenticate(NTCredentials credentials,
String challenge,
String charset)
Deprecated.
Use non-static
authenticate(Credentials, HttpMethod) |
String |
getID()
Deprecated.
no longer used
|
String |
getParameter(String name)
Returns the authentication parameter with the given name, if available.
|
String |
getRealm()
The concept of an authentication realm is not supported by the NTLM
authentication scheme.
|
String |
getSchemeName()
Returns textual designation of the NTLM authentication scheme.
|
boolean |
isComplete()
Tests if the NTLM authentication process has been completed.
|
boolean |
isConnectionBased()
Returns true.
|
void |
processChallenge(String challenge)
Processes the NTLM challenge.
|
public NTLMScheme()
public NTLMScheme(String challenge) throws MalformedChallengeException
challenge - The authentication challengeMalformedChallengeException - is thrown if the authentication challenge
is malformedpublic void processChallenge(String challenge) throws MalformedChallengeException
processChallenge in interface AuthSchemechallenge - the challenge stringMalformedChallengeException - is thrown if the authentication challenge
is malformedpublic boolean isComplete()
isComplete in interface AuthSchemepublic String getSchemeName()
getSchemeName in interface AuthSchementlmpublic String getRealm()
null.getRealm in interface AuthSchemenullpublic String getID()
Additionally, the ID should take into account any changes to the authentication challenge and return a different value when appropriate. For example when the realm changes in basic authentication it should be considered a different authentication attempt and a different value should be returned.
getID in interface AuthSchemepublic String getParameter(String name)
There are no valid parameters for NTLM authentication so this method always returns null.
getParameter in interface AuthSchemename - The name of the parameter to be returnedpublic boolean isConnectionBased()
isConnectionBased in interface AuthSchemepublic static String authenticate(NTCredentials credentials, String challenge) throws AuthenticationException
authenticate(Credentials, HttpMethod)challenge - The challenge.credentials - NTCredentialsAuthenticationException - is thrown if authentication failspublic static String authenticate(NTCredentials credentials, String challenge, String charset) throws AuthenticationException
authenticate(Credentials, HttpMethod)challenge - The challenge.credentials - NTCredentialscharset - The charset to use for encoding the credentialsAuthenticationException - is thrown if authentication failspublic String authenticate(Credentials credentials, String method, String uri) throws AuthenticationException
authenticate(Credentials, HttpMethod)Credentials.authenticate in interface AuthSchemecredentials - The set of credentials to be used for athenticationmethod - Method name is ignored by the NTLM authentication schemeuri - URI is ignored by the NTLM authentication schemeInvalidCredentialsException - if authentication credentials
are not valid or not applicable for this authentication schemeAuthenticationException - if authorization string cannot
be generated due to an authentication failureHttpMethod.getName(),
HttpMethod.getPath()public String authenticate(Credentials credentials, HttpMethod method) throws AuthenticationException
Credentials.authenticate in interface AuthSchemecredentials - The set of credentials to be used for athenticationmethod - The method being authenticatedInvalidCredentialsException - if authentication credentials
are not valid or not applicable for this authentication schemeAuthenticationException - if authorization string cannot
be generated due to an authentication failureCopyright © 2020 Internet2. All rights reserved.