Package org.apache.http.impl.auth
Class NTLMScheme
java.lang.Object
org.apache.http.impl.auth.AuthSchemeBase
org.apache.http.impl.auth.NTLMScheme
- All Implemented Interfaces:
AuthScheme
public class NTLMScheme extends AuthSchemeBase
-
Constructor Summary
Constructors Constructor Description NTLMScheme(NTLMEngine engine) -
Method Summary
Modifier and Type Method Description Headerauthenticate(Credentials credentials, HttpRequest request)Produces an authorization string for the given set ofCredentials.StringgetParameter(String name)Returns authentication parameter with the given name, if available.StringgetRealm()Returns authentication realm.StringgetSchemeName()Returns textual designation of the given authentication scheme.booleanisComplete()Authentication process may involve a series of challenge-response exchanges.booleanisConnectionBased()Tests if the authentication scheme is provides authorization on a per connection basis instead of usual per request basisprotected voidparseChallenge(CharArrayBuffer buffer, int pos, int len)Methods inherited from class org.apache.http.impl.auth.AuthSchemeBase
isProxy, processChallenge
-
Constructor Details
-
NTLMScheme
-
-
Method Details
-
getSchemeName
Description copied from interface:AuthSchemeReturns textual designation of the given authentication scheme.- Returns:
- the name of the given authentication scheme
-
getParameter
Description copied from interface:AuthSchemeReturns authentication parameter with the given name, if available.- Parameters:
name- The name of the parameter to be returned- Returns:
- the parameter with the given name
-
getRealm
Description copied from interface:AuthSchemeReturns authentication realm. If the concept of an authentication realm is not applicable to the given authentication scheme, returnsnull.- Returns:
- the authentication realm
-
isConnectionBased
public boolean isConnectionBased()Description copied from interface:AuthSchemeTests if the authentication scheme is provides authorization on a per connection basis instead of usual per request basis- Returns:
- true if the scheme is connection based, false if the scheme is request based.
-
parseChallenge
protected void parseChallenge(CharArrayBuffer buffer, int pos, int len) throws MalformedChallengeException- Specified by:
parseChallengein classAuthSchemeBase- Throws:
MalformedChallengeException
-
authenticate
public Header authenticate(Credentials credentials, HttpRequest request) throws AuthenticationExceptionDescription copied from interface:AuthSchemeProduces an authorization string for the given set ofCredentials.- Parameters:
credentials- The set of credentials to be used for athenticationrequest- The request being authenticated- Returns:
- the authorization string
- Throws:
AuthenticationException- if authorization string cannot be generated due to an authentication failure
-
isComplete
public boolean isComplete()Description copied from interface:AuthSchemeAuthentication process may involve a series of challenge-response exchanges. This method tests if the authorization process has been completed, either successfully or unsuccessfully, that is, all the required authorization challenges have been processed in their entirety.- Returns:
- true if the authentication process has been completed, false otherwise.
-