public class V1HMACAuthenticator extends Object implements Authenticator
Authenticator
implementation using v1HMAC signatures.Constructor and Description |
---|
V1HMACAuthenticator(String apiKeyId,
String secretApiKey) |
Modifier and Type | Method and Description |
---|---|
String |
getAuthorization(String httpMethod,
URI resourceUri,
List<RequestHeader> httpHeaders)
Returns a value that can be used for the "Authorization" header.
|
public V1HMACAuthenticator(String apiKeyId, String secretApiKey)
apiKeyId
- An identifier for the secret API key. The apiKeyId
can
be retrieved from the Configuration Center. This identifier is
visible in the HTTP request and is also used to identify the
correct account.secretApiKey
- A shared secret. The shared secret can be retrieved from the
Configuration Center. An apiKeyId
and
secretApiKey
always go hand-in-hand, the difference is
that secretApiKey
is never visible in the HTTP
request. This secret is used as input for the HMAC algorithm.public String getAuthorization(String httpMethod, URI resourceUri, List<RequestHeader> httpHeaders)
Authenticator
getAuthorization
in interface Authenticator
httpMethod
- The HTTP method.resourceUri
- The URI
of the resource.httpHeaders
- A list of RequestHeader
s. This list may not be
modified and may not contain headers with the same name.Copyright © 2024 Worldline Global Collect. All rights reserved.