pub struct ValidationConfig {
pub allowed_iss: OneOrVec<Iss>,
pub allowed_aud: OneOrVec<Aud>,
pub validate_exp: bool,
pub validate_nbf: bool,
pub leeway_seconds: u64,
pub allow_missing_jwk_alg_parameter: bool,
}Expand description
ID token verifier validation configuration.
Fields§
§allowed_iss: OneOrVec<Iss>Allowed Iss that an ID token must match.
WARNING: setting this field to an empty OneOrVec::Vec disables the iss validation.
This is an insecure option, please make sure you understand what you are doing.
Mandatory during deserialization.
allowed_aud: OneOrVec<Aud>Allowed Aud that an ID token must match.
WARNING: setting this field to an empty OneOrVec::Vec disables the aud validation.
This is an insecure option, please make sure you understand what you are doing.
Mandatory during deserialization.
validate_exp: boolWhether to force exp field validation.
WARNING: setting this field false disables the exp validation.
Defaults to true during deserialization.
validate_nbf: boolWhether to force nbf field validation.
Defaults to false during deserialization.
leeway_seconds: u64Leeway for exp and nbf validation to account for clock skew.
Default to 60 during deserialization.
allow_missing_jwk_alg_parameter: boolWhether verifier should not fail validation if the JWK lacks the alg parameter.
You may want to set this field to true if the provided JWKS do not have the alg
parameter, such as in https://login.microsoftonline.com/common/discovery/v2.0/keys.
Defaults to false during deserialization.
Implementations§
Source§impl ValidationConfig
impl ValidationConfig
Sourcepub fn builder() -> ValidationConfigBuilder
pub fn builder() -> ValidationConfigBuilder
Create an instance of ValidationConfig using the builder syntax
Trait Implementations§
Source§impl Clone for ValidationConfig
impl Clone for ValidationConfig
Source§fn clone(&self) -> ValidationConfig
fn clone(&self) -> ValidationConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more