#[non_exhaustive]pub enum ValidatorError {
#[non_exhaustive] NoAudience {
section: String,
},
#[non_exhaustive] NoAlgorithms {
key: String,
},
#[non_exhaustive] LeewayTooLarge {
key: String,
leeway_secs: u64,
max: u64,
},
HttpClient(Box<dyn Error + Send + Sync + 'static>),
}Expand description
Why an OAuthValidator could not be built.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]NoAudience
Neither audience nor audiences holds a value. crate::OAuthConfig::resolve
refuses this; only a hand-edited ResolvedOAuthConfig reaches it.
Fields
This variant is marked as non-exhaustive
section: StringThe config block, named per its crate::KeyNaming.
#[non_exhaustive]NoAlgorithms
The algorithm allowlist is empty. Refused by resolve as well.
Fields
This variant is marked as non-exhaustive
key: StringThe algorithms setting, named per its crate::KeyNaming.
#[non_exhaustive]LeewayTooLarge
leeway_secs is over crate::MAX_LEEWAY_SECS. Refused by resolve
as well; re-checked because a larger leeway silently extends every
token’s life (and past the current Unix time, overflows the expiry
arithmetic).
Fields
This variant is marked as non-exhaustive
key: StringThe leeway_secs setting, named per its crate::KeyNaming.
HttpClient(Box<dyn Error + Send + Sync + 'static>)
The HTTP client for metadata/JWKS fetches could not be built (in practice: the TLS backend failed to initialize).
The underlying error is boxed rather than named, so the HTTP client
library’s version is not part of this crate’s public API; it is still
reachable through std::error::Error::source.
Trait Implementations§
Source§impl Debug for ValidatorError
impl Debug for ValidatorError
Source§impl Display for ValidatorError
impl Display for ValidatorError
Source§impl Error for ValidatorError
impl Error for ValidatorError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()