Package com.onfido
Class WebhookEventVerifier
- java.lang.Object
-
- com.onfido.WebhookEventVerifier
-
public class WebhookEventVerifier extends Object
Contains a public method for verifying webhook responses.
-
-
Constructor Summary
Constructors Constructor Description WebhookEventVerifier(String webhookToken)Instantiates a new WebhookEventVerifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebhookEventreadPayload(String rawEventBody, String hexSignature)Takes in a webhook response and signature and verifies it against the instance's token
-
-
-
Constructor Detail
-
WebhookEventVerifier
public WebhookEventVerifier(String webhookToken)
Instantiates a new WebhookEventVerifier.- Parameters:
webhookToken- the webhook token
-
-
Method Detail
-
readPayload
public WebhookEvent readPayload(String rawEventBody, String hexSignature) throws OnfidoInvalidSignatureError
Takes in a webhook response and signature and verifies it against the instance's token- Parameters:
rawEventBody- the raw event bodyhexSignature- the hex signature- Returns:
- the webhook event
- Throws:
OnfidoInvalidSignatureError- the onfido exception
-
-