#[non_exhaustive]pub enum IdTokenError {
JwksValidationFailed(JwksValidationError),
NoIdToken,
MalformedIdToken(String),
Expired,
NotYetValid,
InvalidAudience,
InvalidIssuer {
expected: String,
got: String,
},
NonceMismatch,
}Expand description
Errors that can occur while validating an id_token after a successful token exchange.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
JwksValidationFailed(JwksValidationError)
The JWKS validator rejected the id_token.
NoIdToken
The openid scope was requested but the provider did not return an id_token.
MalformedIdToken(String)
The id_token could not be parsed (malformed JWT, missing required claims).
Expired
The id_token has expired (exp claim is in the past).
NotYetValid
The id_token is not yet valid (nbf claim is in the future).
InvalidAudience
The aud claim does not include the configured client_id.
InvalidIssuer
The iss claim does not match the configured issuer.
Fields
NonceMismatch
The nonce claim is absent or does not match the value sent in the authorization request.
Trait Implementations§
Source§impl Debug for IdTokenError
impl Debug for IdTokenError
Source§impl Display for IdTokenError
impl Display for IdTokenError
Source§impl Error for IdTokenError
impl Error for IdTokenError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<IdTokenError> for AuthError
impl From<IdTokenError> for AuthError
Source§fn from(source: IdTokenError) -> Self
fn from(source: IdTokenError) -> Self
Converts to this type from the input type.
Source§impl From<IdTokenError> for RefreshError
impl From<IdTokenError> for RefreshError
Source§fn from(source: IdTokenError) -> Self
fn from(source: IdTokenError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IdTokenError
impl RefUnwindSafe for IdTokenError
impl Send for IdTokenError
impl Sync for IdTokenError
impl Unpin for IdTokenError
impl UnsafeUnpin for IdTokenError
impl UnwindSafe for IdTokenError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more