Package org.apache.http.impl.auth
Class AuthSchemeBase
java.lang.Object
org.apache.http.impl.auth.AuthSchemeBase
- All Implemented Interfaces:
AuthScheme
- Direct Known Subclasses:
NTLMScheme,RFC2617Scheme
public abstract class AuthSchemeBase extends Object implements AuthScheme
Abstract authentication scheme class that serves as a basis
for all authentication schemes supported by HttpClient. This class
defines the generic way of parsing an authentication challenge. It
does not make any assumptions regarding the format of the challenge
nor does it impose any specific way of responding to that challenge.
- Author:
- Oleg Kalnichevski
-
Constructor Summary
Constructors Constructor Description AuthSchemeBase() -
Method Summary
Modifier and Type Method Description booleanisProxy()Returnstrueif authenticating against a proxy,falseotherwise.protected abstract voidparseChallenge(CharArrayBuffer buffer, int pos, int len)voidprocessChallenge(Header header)Processes the given challenge token.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.http.auth.AuthScheme
authenticate, getParameter, getRealm, getSchemeName, isComplete, isConnectionBased
-
Constructor Details
-
AuthSchemeBase
public AuthSchemeBase()
-
-
Method Details
-
processChallenge
Processes the given challenge token. Some authentication schemes may involve multiple challenge-response exchanges. Such schemes must be able to maintain the state information when dealing with sequential challenges- Specified by:
processChallengein interfaceAuthScheme- Parameters:
header- the challenge header- Throws:
MalformedChallengeException- is thrown if the authentication challenge is malformed
-
parseChallenge
protected abstract void parseChallenge(CharArrayBuffer buffer, int pos, int len) throws MalformedChallengeException- Throws:
MalformedChallengeException
-
isProxy
public boolean isProxy()Returnstrueif authenticating against a proxy,falseotherwise.- Returns:
trueif authenticating against a proxy,falseotherwise
-