org.apache.commons.httpclient.auth
public class NTLMScheme extends Object implements AuthScheme
Constructor Summary | |
---|---|
NTLMScheme()
Default constructor for the NTLM authentication scheme.
| |
NTLMScheme(String challenge)
Constructor for the NTLM authentication scheme.
|
Method Summary | |
---|---|
static String | authenticate(NTCredentials credentials, String challenge)
Create a NTLM authorization string for the given
challenge and NT credentials.
|
static String | authenticate(NTCredentials credentials, String challenge, String charset)
Create a NTLM authorization string for the given
challenge and NT credentials.
|
String | authenticate(Credentials credentials, String method, String uri)
Produces NTLM authorization string for the given set of
Credentials.
|
String | authenticate(Credentials credentials, HttpMethod method)
Produces NTLM authorization string for the given set of
Credentials.
|
String | getID()
Returns a String identifying the authentication challenge. |
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.
|
Since: 3.0
Parameters: challenge The authentication challenge
Throws: MalformedChallengeException is thrown if the authentication challenge is malformed
Deprecated: Use non-static NTLMScheme
Create a NTLM authorization string for the given challenge and NT credentials.Parameters: challenge The challenge. credentials NTCredentials
Returns: a ntlm authorization string
Throws: AuthenticationException is thrown if authentication fails
Deprecated: Use non-static NTLMScheme
Create a NTLM authorization string for the given challenge and NT credentials.Parameters: challenge The challenge. credentials NTCredentials charset The charset to use for encoding the credentials
Returns: a ntlm authorization string
Throws: AuthenticationException is thrown if authentication fails
Since: 3.0
Deprecated: Use NTLMScheme
Produces NTLM authorization string for the given set of Credentials.Parameters: credentials The set of credentials to be used for athentication method Method name is ignored by the NTLM authentication scheme uri URI is ignored by the NTLM authentication scheme
Returns: an NTLM authorization string
Throws: InvalidCredentialsException if authentication credentials are not valid or not applicable for this authentication scheme AuthenticationException if authorization string cannot be generated due to an authentication failure
Parameters: credentials The set of credentials to be used for athentication method The method being authenticated
Returns: an NTLM authorization string
Throws: InvalidCredentialsException if authentication credentials are not valid or not applicable for this authentication scheme AuthenticationException if authorization string cannot be generated due to an authentication failure
Since: 3.0
Deprecated: no longer used
Returns a String identifying the authentication challenge. This is used, in combination with the host and port to determine if authorization has already been attempted or not. Schemes which require multiple requests to complete the authentication should return a different value for each stage in the request.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.
Returns: String a String identifying the authentication challenge. The returned value may be null.
There are no valid parameters for NTLM authentication so this method always returns null.
Parameters: name The name of the parameter to be returned
Returns: the parameter with the given name
null
.
Returns: null
Returns: ntlm
Returns: true if Basic authorization has been processed, false otherwise.
Since: 3.0
Returns: true.
Since: 3.0
Parameters: challenge the challenge string
Throws: MalformedChallengeException is thrown if the authentication challenge is malformed
Since: 3.0