Package org.apache.hc.client5.http
Interface AuthenticationStrategy
- All Known Implementing Classes:
DefaultAuthenticationStrategy
@Contract(threading=STATELESS)
public interface AuthenticationStrategy
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 TypeMethodDescriptionselect
(ChallengeType challengeType, Map<String, AuthChallenge> challenges, org.apache.hc.core5.http.protocol.HttpContext context) Returns an list ofAuthScheme
s to handle the givenAuthChallenge
s in their order of preference.
-
Method Details
-
select
List<AuthScheme> select(ChallengeType challengeType, Map<String, AuthChallenge> challenges, org.apache.hc.core5.http.protocol.HttpContext context) Returns an list ofAuthScheme
s to handle the givenAuthChallenge
s in their order of preference.- Parameters:
challengeType
- challenge type.challenges
- map of challenges keyed by lowercase auth scheme names.context
- HTTP context.- Returns:
- authentication auth schemes that can be used for authentication. Can be empty.
- Since:
- 5.0
-