Top Fields Constructors Methods
org.apache.http.impl.client

pack-priv Class AuthenticationStrategyAdaptor

extends Object
implements AuthenticationStrategy
Class Inheritance
All Implemented Interfaces
org.apache.http.client.AuthenticationStrategy
Annotations
@Contract
threading:IMMUTABLE
@Deprecated
Imports
java.util.LinkedList, .Locale, .Map, .Queue, org.apache.commons.logging.Log, .LogFactory, org.apache.http.Header, .HttpHost, .HttpResponse, org.apache.http.annotation.Contract, .ThreadingBehavior, org.apache.http.auth.AuthOption, .AuthScheme, .AuthScope, .AuthenticationException, .Credentials, .MalformedChallengeException, org.apache.http.client.AuthCache, .AuthenticationHandler, .AuthenticationStrategy, .CredentialsProvider, org.apache.http.client.params.AuthPolicy, org.apache.http.client.protocol.ClientContext, org.apache.http.protocol.HttpContext, org.apache.http.util.Args

Deprecated

(4.2) do not use

Field Summary

Modifier and TypeField and Description
private final AuthenticationHandler
handler

Deprecated as a consequence of AuthenticationHandler being deprecated.
private final Log

Constructor Summary

AccessConstructor and Description
public
AuthenticationStrategyAdaptor(final AuthenticationHandler handler)

Deprecated as a consequence of AuthenticationHandler being deprecated.

Method Summary

Modifier and TypeMethod and Description
public void
authFailed(final HttpHost
authentication host.
authhost
,
final AuthScheme
authentication scheme used.
authScheme
,
final HttpContext
HTTP context.
context
)

Implements org.apache.http.client.AuthenticationStrategy.authFailed.

Callback invoked in case of unsuccessful authentication.
public void
authSucceeded(final HttpHost
authentication host.
authhost
,
final AuthScheme
authentication scheme used.
authScheme
,
final HttpContext
HTTP context.
context
)

Implements org.apache.http.client.AuthenticationStrategy.authSucceeded.

Callback invoked in case of successful authentication.
public Map<String, Header>
getChallenges(final HttpHost
authentication host.
authhost
,
final HttpResponse
HTTP response.
response
,
final HttpContext
HTTP context.
context
)

Implements org.apache.http.client.AuthenticationStrategy.getChallenges.

Extracts from the given HTTP response a collection of authentication challenges, each of which represents an authentication scheme supported by the authentication host.
public AuthenticationHandler
getHandler()

Deprecated as a consequence of AuthenticationHandler being deprecated.
public boolean
isAuthenticationRequested(final HttpHost
authentication host.
authhost
,
final HttpResponse
HTTP response.
response
,
final HttpContext
HTTP context.
context
)

Implements org.apache.http.client.AuthenticationStrategy.isAuthenticationRequested.

Determines if the given HTTP response response represents an authentication challenge that was sent back as a result of authentication failure.
private boolean
isCachable(final AuthScheme authScheme)

public Queue<AuthOption>
select(final Map<String, Header>
collection of challenges.
challenges
,
final HttpHost
authentication host.
authhost
,
final HttpResponse
HTTP response.
response
,
final HttpContext
HTTP context.
context
)

Implements org.apache.http.client.AuthenticationStrategy.select.

Selects one authentication challenge out of all available and creates and generates AuthOption instance capable of processing that challenge.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

handlerback to summary
private final AuthenticationHandler handler

Deprecated

as a consequence of AuthenticationHandler being deprecated. See corresponding docs for further information.

logback to summary
private final Log log

Constructor Detail

AuthenticationStrategyAdaptorback to summary
public AuthenticationStrategyAdaptor(final AuthenticationHandler handler)

Deprecated

as a consequence of AuthenticationHandler being deprecated. See corresponding docs for further information.

Method Detail

authFailedback to summary
public void authFailed(final HttpHost authhost, final AuthScheme authScheme, final HttpContext context)

Implements org.apache.http.client.AuthenticationStrategy.authFailed.

Doc from org.apache.http.client.AuthenticationStrategy.authFailed.

Callback invoked in case of unsuccessful authentication.

Parameters
authhost:HttpHost

authentication host.

authScheme:AuthScheme

authentication scheme used.

context:HttpContext

HTTP context.

Annotations
@Override
authSucceededback to summary
public void authSucceeded(final HttpHost authhost, final AuthScheme authScheme, final HttpContext context)

Implements org.apache.http.client.AuthenticationStrategy.authSucceeded.

Doc from org.apache.http.client.AuthenticationStrategy.authSucceeded.

Callback invoked in case of successful authentication.

Parameters
authhost:HttpHost

authentication host.

authScheme:AuthScheme

authentication scheme used.

context:HttpContext

HTTP context.

Annotations
@Override
getChallengesback to summary
public Map<String, Header> getChallenges(final HttpHost authhost, final HttpResponse response, final HttpContext context) throws MalformedChallengeException

Implements org.apache.http.client.AuthenticationStrategy.getChallenges.

Doc from org.apache.http.client.AuthenticationStrategy.getChallenges.

Extracts from the given HTTP response a collection of authentication challenges, each of which represents an authentication scheme supported by the authentication host.

Parameters
authhost:HttpHost

authentication host.

response:HttpResponse

HTTP response.

context:HttpContext

HTTP context.

Returns:Map<String, Header>

a collection of challenges keyed by names of corresponding authentication schemes.

Annotations
@Override
Exceptions
MalformedChallengeException:
if one of the authentication challenges is not valid or malformed.
getHandlerback to summary
public AuthenticationHandler getHandler()

Deprecated

as a consequence of AuthenticationHandler being deprecated. See corresponding docs for further information.

isAuthenticationRequestedback to summary
public boolean isAuthenticationRequested(final HttpHost authhost, final HttpResponse response, final HttpContext context)

Implements org.apache.http.client.AuthenticationStrategy.isAuthenticationRequested.

Doc from org.apache.http.client.AuthenticationStrategy.isAuthenticationRequested.

Determines if the given HTTP response response represents an authentication challenge that was sent back as a result of authentication failure.

Parameters
authhost:HttpHost

authentication host.

response:HttpResponse

HTTP response.

context:HttpContext

HTTP context.

Returns:boolean

true if user authentication is required, false otherwise.

Annotations
@Override
isCachableback to summary
private boolean isCachable(final AuthScheme authScheme)
selectback to summary
public Queue<AuthOption> select(final Map<String, Header> challenges, final HttpHost authhost, final HttpResponse response, final HttpContext context) throws MalformedChallengeException

Implements org.apache.http.client.AuthenticationStrategy.select.

Doc from org.apache.http.client.AuthenticationStrategy.select.

Selects one authentication challenge out of all available and creates and generates AuthOption instance capable of processing that challenge.

Parameters
challenges:Map<String, Header>

collection of challenges.

authhost:HttpHost

authentication host.

response:HttpResponse

HTTP response.

context:HttpContext

HTTP context.

Returns:Queue<AuthOption>

authentication auth schemes that can be used for authentication. Can be empty.

Annotations
@Override
Exceptions
MalformedChallengeException:
if one of the authentication challenges is not valid or malformed.