View Source SanityWebhookPlug.Signature (sanity_webhook_plug v0.1.1)
Compute and verify signatures from Sanity webhooks
Link to this section Summary
Functions
Compute the signature for Sanity webhooks
Verify a payload, timestamp, and secret against a computed signature
Link to this section Types
Link to this section Functions
@spec compute(pos_integer(), binary(), String.t()) :: {:ok, String.t()} | {:error, String.t(), nil}
Compute the signature for Sanity webhooks
@spec verify(String.t(), pos_integer(), binary(), secret()) :: :ok | {:error, String.t(), String.t()}
Verify a payload, timestamp, and secret against a computed signature