autoendpoint::extractors::subscription

Function validate_vapid_jwt

source
fn validate_vapid_jwt(
    vapid: &VapidHeaderWithKey,
    settings: &Settings,
    metrics: &Metrics,
) -> Result<(), ApiError>
Expand description

Validate the VAPID JWT token. Specifically,

  • Check the signature
  • Make sure it hasn’t expired
  • Make sure the expiration isn’t too far into the future

This is mostly taken care of by the jsonwebtoken library