pub enum TokenError {
Show 15 variants
UnsupportedGrantType(String),
MissingParameter(&'static str),
InvalidCode,
RedirectUriMismatch,
PkceFailed,
CodeKeyMismatch,
ClientMismatch,
ClientAssertionRequired,
ClientAuthenticationChanged,
Dpop(DpopError),
InvalidRefreshToken,
RefreshReused,
DpopKeyMismatch,
ClientRefused,
NotKept,
}Expand description
Why token issuance or refresh was refused.
Variants§
UnsupportedGrantType(String)
grant_type named something other than authorization_code or
refresh_token.
MissingParameter(&'static str)
A required parameter for the requested grant type was absent.
InvalidCode
code is unknown, expired, or was already redeemed.
RedirectUriMismatch
redirect_uri does not match the one the code was issued for.
PkceFailed
code_verifier does not hash to code_challenge.
CodeKeyMismatch
The exchange’s DPoP proof was signed with a key other than the one the sign-in’s push was signed with (RFC 9449 §10).
ClientMismatch
client_id does not match the one the code was issued to.
ClientAssertionRequired
This code or login belongs to a confidential client, and the request carries no client assertion.
ClientAuthenticationChanged
The request authenticated its client differently from how the login began: an assertion signed with another key, or one brought to a public client’s login.
Dpop(DpopError)
The DPoP proof presented was refused; see DpopError.
InvalidRefreshToken
refresh_token is unknown or has expired.
RefreshReused
refresh_token had already been rotated away; its whole family has
been revoked as a result of this call.
DpopKeyMismatch
The DPoP proof presented a different key than the one this token family was minted bound to.
ClientRefused
This server’s policy refuses the client a token for this account. Nothing is revoked: if the policy lifts, the same refresh token works again.
NotKept
The grant could not be written down, so no pair was issued. A pair this deployment will not remember is one that stops working at the next restart with nothing saying why.
Trait Implementations§
Source§impl Clone for TokenError
impl Clone for TokenError
Source§fn clone(&self) -> TokenError
fn clone(&self) -> TokenError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TokenError
impl Debug for TokenError
Source§impl Display for TokenError
impl Display for TokenError
Source§impl Error for TokenError
impl Error for TokenError
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()
Source§impl From<DpopError> for TokenError
impl From<DpopError> for TokenError
Source§impl PartialEq for TokenError
impl PartialEq for TokenError
Source§fn eq(&self, other: &TokenError) -> bool
fn eq(&self, other: &TokenError) -> bool
self and other values to be equal, and is used by ==.impl Eq for TokenError
impl StructuralPartialEq for TokenError
Auto Trait Implementations§
impl Freeze for TokenError
impl RefUnwindSafe for TokenError
impl Send for TokenError
impl Sync for TokenError
impl Unpin for TokenError
impl UnsafeUnpin for TokenError
impl UnwindSafe for TokenError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more