pub fn cavage_verify_with_policy<B, F>(
req: &Request<B>,
policy: &VerifyPolicy,
now: DateTime<Utc>,
resolve_key: F,
) -> Result<CavageVerified, Error>Expand description
Verifies a Cavage-signed request with replay-protection.
Equivalent to cavage_verify except that policy is consulted to
reject stale, future-dated or expired timestamps against now. Most
production callers should use this form with
VerifyPolicy::mastodon (or their own tuning) and Utc::now().
ยงErrors
Same as cavage_verify plus Error::TimestampTooOld,
Error::TimestampInFuture, Error::TimestampExpired and
Error::TimestampMissing when the policy is violated.