Top Description Fields Constructors Methods
org.apache.hc.client5.http.impl

public Class DefaultAuthenticationStrategy

extends Object
implements AuthenticationStrategy
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.AuthenticationStrategy
Annotations
@Contract
threading:STATELESS
Imports
java.util.ArrayList, .Arrays, .Collection, .Collections, .List, .Locale, .Map, org.apache.hc.client5.http.AuthenticationStrategy, org.apache.hc.client5.http.auth.AuthChallenge, .AuthScheme, .AuthSchemeFactory, .ChallengeType, .StandardAuthScheme, org.apache.hc.client5.http.config.RequestConfig, org.apache.hc.client5.http.protocol.HttpClientContext, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.config.Lookup, org.apache.hc.core5.http.protocol.HttpContext, org.apache.hc.core5.util.Args, org.slf4j.Logger, .LoggerFactory

Default implementation of AuthenticationStrategy
Since
5.0

Field Summary

Modifier and TypeField and Description
private static final List<String>
public static final DefaultAuthenticationStrategy
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<AuthScheme>
select(final ChallengeType
challenge type.
challengeType
,
final Map<String, AuthChallenge>
map of challenges keyed by lowercase auth scheme names.
challenges
,
final HttpContext
HTTP context.
context
)

Implements org.apache.hc.client5.http.AuthenticationStrategy.select.

Returns an list of AuthSchemes to handle the given AuthChallenges in their order of preference.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_SCHEME_PRIORITYback to summary
private static final List<String> DEFAULT_SCHEME_PRIORITY
INSTANCEback to summary
public static final DefaultAuthenticationStrategy INSTANCE
LOGback to summary
private static final Logger LOG

Constructor Detail

DefaultAuthenticationStrategyback to summary
public DefaultAuthenticationStrategy()

Method Detail

selectback to summary
public List<AuthScheme> select(final ChallengeType challengeType, final Map<String, AuthChallenge> challenges, final HttpContext context)

Implements org.apache.hc.client5.http.AuthenticationStrategy.select.

Doc from org.apache.hc.client5.http.AuthenticationStrategy.select.

Returns an list of AuthSchemes to handle the given AuthChallenges in their order of preference.

Parameters
challengeType:ChallengeType

challenge type.

challenges:Map<String, AuthChallenge>

map of challenges keyed by lowercase auth scheme names.

context:HttpContext

HTTP context.

Returns:List<AuthScheme>

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

Annotations
@Override