Class ConfigurableV1HMACAuthenticator
java.lang.Object
com.github.robtimus.connect.sdk.java.springboot.ConfigurableV1HMACAuthenticator
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionConfigurableV1HMACAuthenticator
(String apiKeyId, String secretApiKey) Creates a new configurable authenticator. -
Method Summary
Modifier and TypeMethodDescriptiongetAuthorization
(String httpMethod, URI resourceUri, List<RequestHeader> requestHeaders) void
Sets the new API key to use.
-
Constructor Details
-
ConfigurableV1HMACAuthenticator
Creates a new configurable authenticator.- Parameters:
apiKeyId
- The initial API key id.secretApiKey
- The initial secret API key.
-
-
Method Details
-
setApiKey
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 interfaceAuthenticator
-