Function bbjwt::default_validations

source ·
pub fn default_validations(
    issuer: &str,
    audience: Option<&str>,
    nonce: Option<&str>
) -> Vec<ValidationStep>
Expand description

Return a default set of validation steps.

The validation steps returned by this function match the recommendations for OpenID Connect ID tokens, as outlined in the OpenID Connect spec.

If using the Implicit Flow, verifying the Nonce value is mandatory. For Authorization code flow, the list is very long.

Arguments

  • issuer - the contents the “iss” claim must have
  • audience - if Some, the value the “aud” claim must have
  • nonce - if Some, the value the “nonce” claim must have

Returns

A vector of ValidationStep variants that can be passed into the validate_jwt function.