Class ConfigurableV1HMACAuthenticator

java.lang.Object
com.github.robtimus.connect.sdk.java.springboot.ConfigurableV1HMACAuthenticator
All Implemented Interfaces:
Authenticator

public class ConfigurableV1HMACAuthenticator extends Object implements Authenticator
An Authenticator implementation that allows the API key id and secret to be replaced, something that V1HMACAuthenticator does not support. This class is thread-safe.
Author:
Rob Spoor
Since:
3.8
  • Constructor Details

    • ConfigurableV1HMACAuthenticator

      public ConfigurableV1HMACAuthenticator(String apiKeyId, String secretApiKey)
      Creates a new configurable authenticator.
      Parameters:
      apiKeyId - The initial API key id.
      secretApiKey - The initial secret API key.
  • Method Details

    • setApiKey

      public void setApiKey(String apiKeyId, String secretApiKey)
      Sets the new API key to use.
      Parameters:
      apiKeyId - The new API key id.
      secretApiKey - The new secret API key.
    • getAuthorization

      public String getAuthorization(String httpMethod, URI resourceUri, List<RequestHeader> requestHeaders)
      Specified by:
      getAuthorization in interface Authenticator