|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.http.impl.auth.AuthSchemeBase
@NotThreadSafe public abstract class AuthSchemeBase
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.
Constructor Summary | |
---|---|
AuthSchemeBase()
|
|
AuthSchemeBase(ChallengeState challengeState)
Creates an instance of AuthSchemeBase with the given challenge state. |
Method Summary | |
---|---|
Header |
authenticate(Credentials credentials,
HttpRequest request,
HttpContext context)
Produces an authorization string for the given set of Credentials . |
ChallengeState |
getChallengeState()
Returns ChallengeState value or null if unchallenged. |
boolean |
isProxy()
Returns true if authenticating against a proxy, false
otherwise. |
protected abstract void |
parseChallenge(CharArrayBuffer buffer,
int beginIndex,
int endIndex)
|
void |
processChallenge(Header header)
Processes the given challenge token. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.http.auth.AuthScheme |
---|
authenticate, getParameter, getRealm, getSchemeName, isComplete, isConnectionBased |
Constructor Detail |
---|
public AuthSchemeBase(ChallengeState challengeState)
public AuthSchemeBase()
Method Detail |
---|
public void processChallenge(Header header) throws MalformedChallengeException
processChallenge
in interface AuthScheme
header
- the challenge header
MalformedChallengeException
- is thrown if the authentication challenge
is malformedpublic Header authenticate(Credentials credentials, HttpRequest request, HttpContext context) throws AuthenticationException
ContextAwareAuthScheme
Credentials
.
authenticate
in interface ContextAwareAuthScheme
credentials
- The set of credentials to be used for athenticationrequest
- The request being authenticatedcontext
- HTTP context
AuthenticationException
- if authorization string cannot
be generated due to an authentication failureprotected abstract void parseChallenge(CharArrayBuffer buffer, int beginIndex, int endIndex) throws MalformedChallengeException
MalformedChallengeException
public boolean isProxy()
true
if authenticating against a proxy, false
otherwise.
public ChallengeState getChallengeState()
ChallengeState
value or null
if unchallenged.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |