Top Description Methods
org.apache.http.auth

public Interface ContextAwareAuthScheme

extends AuthScheme
Known Direct Implementers
org.apache.http.impl.auth.AuthSchemeBase
Imports
org.apache.http.Header, .HttpRequest, org.apache.http.protocol.HttpContext

This interface represents an extended authentication scheme that requires access to HttpContext in order to generate an authorization string. TODO: Fix AuthScheme interface in the next major version
Since
4.1

Method Summary

Modifier and TypeMethod and Description
public Header

Returns:

the authorization string
authenticate
(Credentials
The set of credentials to be used for athentication
credentials
,
HttpRequest
The request being authenticated
request
,
HttpContext
HTTP context
context
)

Produces an authorization string for the given set of Credentials.

Inherited from org.apache.http.auth.AuthScheme:
authenticategetParametergetRealmgetSchemeNameisCompleteisConnectionBasedprocessChallenge

Method Detail

authenticateback to summary
public Header authenticate(Credentials credentials, HttpRequest request, HttpContext context) throws AuthenticationException

Produces an authorization string for the given set of Credentials.

Parameters
credentials:Credentials

The set of credentials to be used for athentication

request:HttpRequest

The request being authenticated

context:HttpContext

HTTP context

Returns:Header

the authorization string

Exceptions
AuthenticationException:
if authorization string cannot be generated due to an authentication failure