public class WebhookEncryptionService extends Object
| Constructor and Description |
|---|
WebhookEncryptionService(ApiClient apiClient) |
| Modifier and Type | Method and Description |
|---|---|
ApiClient |
getApiClient() |
boolean |
isContentValid(String signatureHeader,
String contentToVerify)
Verify webhook content
|
boolean |
isContentValid(String signatureHeader,
String contentToVerify,
String encryptionProviderName)
Verify webhook content
|
WebhookEncryptionPublicKey |
read(String id)
Read
Reads the entity with the given 'id' and returns it.
|
WebhookEncryptionPublicKey |
read(String id,
Map<String,Object> params)
Read
Reads the entity with the given 'id' and returns it.
|
com.google.api.client.http.HttpResponse |
readForHttpResponse(String id) |
com.google.api.client.http.HttpResponse |
readForHttpResponse(String id,
Map<String,Object> params) |
void |
setApiClient(ApiClient apiClient) |
public WebhookEncryptionService(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
public WebhookEncryptionPublicKey read(String id) throws IOException
200 - This status code indicates that a client request was successfully received, understood, and accepted.
442 - This status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error.
542 - This status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the client request.
id - The ID of the key version.IOException - if an error occurs while attempting to invoke the API
For more information visit this link.public WebhookEncryptionPublicKey read(String id, Map<String,Object> params) throws IOException
200 - This status code indicates that a client request was successfully received, understood, and accepted.
442 - This status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error.
542 - This status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the client request.
id - The ID of the key version.params - Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.IOException - if an error occurs while attempting to invoke the API
For more information visit this link.public com.google.api.client.http.HttpResponse readForHttpResponse(String id) throws IOException
IOExceptionpublic com.google.api.client.http.HttpResponse readForHttpResponse(String id, Map<String,Object> params) throws IOException
IOExceptionpublic boolean isContentValid(String signatureHeader, String contentToVerify, String encryptionProviderName)
signatureHeader - Signature header 'X-Signature' value from the Http requestcontentToVerify - Raw webhook content in String formatencryptionProviderName - Encryption provider namepublic boolean isContentValid(String signatureHeader, String contentToVerify)
Uses BouncyCastle as encryption provider.
Important: this method updates list of Security providers:
Security.addProvider(new BouncyCastleProvider())
signatureHeader - Signature header 'X-Signature' value from the Http requestcontentToVerify - Raw webhook content in String formatCopyright © 2024. All rights reserved.