WardrikTriggers. Webhook
(wardrik_triggers v0.1.0-rc.1)
Copy Markdown
Verifies webhook requests against a trigger's secret.
:shared- the request presents the secret asAuthorization: Bearer SECRET, or as:path_secret.:standard- the request is signed as Standard Webhooks specifies. A signature more than five minutes old fails.
Summary
Types
A request: its raw body, its headers with lowercase names, and an optional path_secret.
Functions
Returns the request's id: its Idempotency-Key, its webhook-id, or a SHA-256 of its body.
Appends the first 32768 characters of the request's body to prompt.
Returns :ok if request verifies with secret, or {:error, reason}.
Types
Functions
Returns the request's id: its Idempotency-Key, its webhook-id, or a SHA-256 of its body.
Appends the first 32768 characters of the request's body to prompt.
@spec verify(:shared | :standard, String.t(), request(), DateTime.t()) :: :ok | {:error, String.t()}
Returns :ok if request verifies with secret, or {:error, reason}.