Class WebhookVerifier

java.lang.Object
com.kingsrook.qqq.backend.core.utils.webhooks.WebhookVerifier

public final class WebhookVerifier extends Object
Verifies a signed webhook request (Standard Webhooks format, see WebhookSigner).

Checks, in order: the three headers are present, the timestamp is within the tolerance of now (default five minutes, either direction, which stops replays of old requests), and at least one v1 signature matches one of the receiver's secrets. Comparison is constant time. Unknown signature versions are ignored, so a future scheme can be added alongside v1.

Receivers should also remember recent webhook-ids and ignore a repeat: the same id is sent again on every retry of the same event.