Skip to main content

verify_webhook_timestamp

Function verify_webhook_timestamp 

Source
pub fn verify_webhook_timestamp(
    svix_timestamp: &str,
    tolerance: Duration,
) -> Result<(), SignatureError>
Available on crate feature webhook-verify only.
Expand description

Reject deliveries whose svix-timestamp is more than tolerance away from now (in either direction), the standard defense against replayed payloads. See DEFAULT_WEBHOOK_TOLERANCE.