Interface CredentialsProvider

All Known Implementing Classes:
ApiKeyCredentialsProvider, BasicAuthCredentialsProvider, GuestCredentialsProvider, NetrcCredentialsProvider

public interface CredentialsProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configureClientBuilder(URI baseURI, org.apache.hc.client5.http.impl.classic.HttpClientBuilder builder)
     
    void
    configureRequest(URI baseURI, org.apache.hc.client5.http.classic.methods.HttpUriRequest request, org.apache.hc.client5.http.protocol.HttpClientContext httpClientContext)
     
    void
    Initialize the connection before its first request.
    default boolean
    shouldRetryRequest(CommandException exception, org.apache.hc.client5.http.classic.methods.HttpUriRequest request)
    Should the Command attempt to retry the request?
  • Method Details

    • configureClientBuilder

      void configureClientBuilder(URI baseURI, org.apache.hc.client5.http.impl.classic.HttpClientBuilder builder)
    • configureRequest

      void configureRequest(URI baseURI, org.apache.hc.client5.http.classic.methods.HttpUriRequest request, org.apache.hc.client5.http.protocol.HttpClientContext httpClientContext) throws org.apache.hc.client5.http.auth.AuthenticationException
      Throws:
      org.apache.hc.client5.http.auth.AuthenticationException
    • initializeConnection

      void initializeConnection(Connection connection) throws IOException, CommandException
      Initialize the connection before its first request. For example, make a request to retrieve CSRF token & session ID and/or ensure the user is logged in.
      Throws:
      IOException
      CommandException
    • shouldRetryRequest

      default boolean shouldRetryRequest(CommandException exception, org.apache.hc.client5.http.classic.methods.HttpUriRequest request)
      Should the Command attempt to retry the request?