Class WebhookEventVerifier


  • public class WebhookEventVerifier
    extends Object
    Contains a public method for verifying webhook responses.
    • 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 OnfidoException
        Takes in a webhook response and signature and verifies it against the instance's token
        Parameters:
        rawEventBody - the raw event body
        hexSignature - the hex signature
        Returns:
        the webhook event
        Throws:
        OnfidoException - the onfido exception