Top Description Methods
org.apache.hc.client5.http

public Interface AuthenticationStrategy

Known Direct Implementers
org.apache.hc.client5.http.impl.DefaultAuthenticationStrategy
Annotations
@Contract
threading:STATELESS
Imports
java.util.List, .Map, org.apache.hc.client5.http.auth.AuthChallenge, .AuthScheme, .ChallengeType, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior, org.apache.hc.core5.http.protocol.HttpContext

Strategy to select auth schemes in order of preference based on auth challenges presented by the opposite endpoint (target server or a proxy).

Implementations of this interface must be thread-safe. Access to shared data must be synchronized as methods of this interface may be executed from multiple threads.

Since
4.2

Method Summary

Modifier and TypeMethod and Description
public List<AuthScheme>

Returns:

authentication auth schemes that can be used for authentication. Can be empty.
select
(ChallengeType
challenge type.
challengeType
,
Map<String, AuthChallenge>
map of challenges keyed by lowercase auth scheme names.
challenges
,
HttpContext
HTTP context.
context
)

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

Method Detail

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

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.

Since
5.0