public class DefaultAuthenticator extends Object implements Authenticator
Authenticator implementation.| Constructor and Description |
|---|
DefaultAuthenticator(String apiKeyId,
String secretApiKey) |
DefaultAuthenticator(String apiKeyId,
String secretApiKey,
AuthorizationType authorizationType) |
| Modifier and Type | Method and Description |
|---|---|
String |
createSimpleAuthenticationSignature(String httpMethod,
URI resourceUri,
List<RequestHeader> httpHeaders)
Creates a signature for the simple security model.
|
public DefaultAuthenticator(String apiKeyId, String secretApiKey)
apiKeyId - An identifier for the secret API key. This identifier is
visible in the HTTP request and is also used to identify
the correct account.secretApiKey - A shared secret. 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 DefaultAuthenticator(String apiKeyId, String secretApiKey, AuthorizationType authorizationType)
authorizationType - Based on this value both the Online Payments platform and the merchant know
which security implementation is used. A version number is
used for backward compatibility in the future.apiKeyId - An identifier for the secret API key. This identifier is
visible in the HTTP request and is also used to identify
the correct account.secretApiKey - A shared secret. 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 createSimpleAuthenticationSignature(String httpMethod, URI resourceUri, List<RequestHeader> httpHeaders)
AuthenticatorcreateSimpleAuthenticationSignature in interface AuthenticatorhttpMethod - The HTTP method.resourceUri - The URI of the resource.httpHeaders - A list of RequestHeaders. This list may not be
modified and may not contain headers with the same name.Copyright © 2024 Worldline Online Payments Direct. All rights reserved.