org.apache.hc.client5.http.impl

## Class DefaultAuthenticationStrategy

- java.lang.Object
- - org.apache.hc.client5.http.impl.DefaultAuthenticationStrategy

- All Implemented Interfaces:
    AuthenticationStrategy

      @Contract(threading=STATELESS)
      public class DefaultAuthenticationStrategy
      extends Object
      implements AuthenticationStrategy

  Default implementation of `AuthenticationStrategy`
  Since:
    5.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DefaultAuthenticationStrategy` | `INSTANCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAuthenticationStrategy()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<AuthScheme>` | `select(ChallengeType challengeType, Map<String,AuthChallenge> challenges, org.apache.hc.core5.http.protocol.HttpContext context)` Returns an list of `AuthScheme`s to handle the given `AuthChallenge`s in their order of preference.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final DefaultAuthenticationStrategy INSTANCE

  - ### Constructor Detail

    - #### DefaultAuthenticationStrategy

          public DefaultAuthenticationStrategy()

  - ### Method Detail

    - #### select

          public List<AuthScheme> select(ChallengeType challengeType,
                                Map<String,AuthChallenge> challenges,
                                org.apache.hc.core5.http.protocol.HttpContext context)

      Description copied from interface: `AuthenticationStrategy`
      Returns an list of `AuthScheme`s to handle the given `AuthChallenge`s in their order of preference.
      Specified by:
        `select` in interface `AuthenticationStrategy`
      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.

Copyright © 1999–2022 The Apache Software Foundation. All rights reserved.