public abstract class

AuthSchemeBase

extends Object
implements ContextAwareAuthScheme
java.lang.Object
   ↳ org.apache.http.impl.auth.AuthSchemeBase
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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.

Summary

Public Constructors
AuthSchemeBase()
Public Methods
Header authenticate(Credentials credentials, HttpRequest request, HttpContext context)
Produces an authorization string for the given set of Credentials.
boolean isProxy()
Returns true if authenticating against a proxy, false otherwise.
void processChallenge(Header header)
Processes the given challenge token.
String toString()
Protected Methods
abstract void parseChallenge(CharArrayBuffer buffer, int beginIndex, int endIndex)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.auth.AuthScheme
From interface org.apache.http.auth.ContextAwareAuthScheme

Public Constructors

public AuthSchemeBase ()

Also: HttpClient

Public Methods

public Header authenticate (Credentials credentials, HttpRequest request, HttpContext context)

Also: HttpClient

Produces an authorization string for the given set of Credentials.

Parameters
credentials The set of credentials to be used for athentication
request The request being authenticated
context HTTP context
Returns
  • the authorization string

public boolean isProxy ()

Also: HttpClient

Returns true if authenticating against a proxy, false otherwise.

Returns
  • true if authenticating against a proxy, false otherwise

public void processChallenge (Header header)

Also: HttpClient

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

Parameters
header the challenge header
Throws
MalformedChallengeException is thrown if the authentication challenge is malformed

public String toString ()

Protected Methods

protected abstract void parseChallenge (CharArrayBuffer buffer, int beginIndex, int endIndex)

Also: HttpClient