Class WebhookSignatureUtil
- java.lang.Object
-
- com.broadleafcommerce.payment.service.gateway.webhooks.util.WebhookSignatureUtil
-
public class WebhookSignatureUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description WebhookSignatureUtil(CheckoutConfigurationProperties checkoutConfigurationProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateSignature(@NonNull String data, String applicationId, String tenantId)Generates a SHA-256 hash based on the webhook request body & the secret API keyprotected CheckoutConfigurationPropertiesgetCheckoutConfigurationProperties()
-
-
-
Constructor Detail
-
WebhookSignatureUtil
public WebhookSignatureUtil(CheckoutConfigurationProperties checkoutConfigurationProperties)
-
-
Method Detail
-
generateSignature
public String generateSignature(@NonNull @NonNull String data, @Nullable String applicationId, @Nullable String tenantId)
Generates a SHA-256 hash based on the webhook request body & the secret API key- Parameters:
data- The raw webhook request body, in the form of a StringapplicationId- The application context id used to identify the correct secret API keytenantId- The tenant context id used to identify the correct secret API key- Returns:
- a SHA-256 hash based on the webhook request body & the secret API key
-
getCheckoutConfigurationProperties
protected CheckoutConfigurationProperties getCheckoutConfigurationProperties()
-
-