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 Detail

      • select

        java.util.List<AuthScheme> select​(ChallengeType challengeType,
                                          java.util.Map<java.lang.String,​AuthChallenge> challenges,
                                          org.apache.hc.core5.http.protocol.HttpContext context)
        Returns an list of AuthSchemes to handle the given AuthChallenges 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