pub enum TokenGrantError {
InvalidGrant(String),
InvalidClient(String),
InvalidScope(String),
PkceVerificationFailed,
UnsupportedGrantType,
DpopMismatch,
AuthorizationPending,
SlowDown,
ExpiredToken,
AccessDenied,
InvalidTarget(String),
ServerError(String),
}Expand description
Domain-specific errors for OAuth token grant processing.
Variants§
InvalidGrant(String)
Invalid grant (e.g., invalid authorization code or refresh token)
InvalidClient(String)
Invalid client (e.g., client ID mismatch or missing DPoP header)
InvalidScope(String)
RFC 6749 §6: a refresh-token grant requested a scope that is not a subset of the scope originally granted to the token being refreshed.
PkceVerificationFailed
PKCE verification failed
UnsupportedGrantType
Unsupported grant type
DpopMismatch
DPoP JKT mismatch
AuthorizationPending
RFC 8628: the authorization request is still pending (user has not yet approved or denied the device code).
SlowDown
RFC 8628: the client is polling faster than the permitted interval.
ExpiredToken
RFC 8628: the device code has expired.
AccessDenied
RFC 8628: the user denied the authorization request.
InvalidTarget(String)
RFC 8707: the requested resource does not match the grant.
ServerError(String)
Server error (database or other internal error)
Trait Implementations§
Source§impl Debug for TokenGrantError
impl Debug for TokenGrantError
Source§impl Display for TokenGrantError
impl Display for TokenGrantError
Source§impl Error for TokenGrantError
impl Error for TokenGrantError
1.30.0 · 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 TokenGrantError
impl From<DpopError> for TokenGrantError
Source§impl From<TokenGrantError> for ControllerError
impl From<TokenGrantError> for ControllerError
Source§fn from(err: TokenGrantError) -> Self
fn from(err: TokenGrantError) -> Self
Auto Trait Implementations§
impl Freeze for TokenGrantError
impl RefUnwindSafe for TokenGrantError
impl Send for TokenGrantError
impl Sync for TokenGrantError
impl Unpin for TokenGrantError
impl UnsafeUnpin for TokenGrantError
impl UnwindSafe for TokenGrantError
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<E> InstrumentError for Ewhere
TracedError<E>: From<E>,
impl<E> InstrumentError for Ewhere
TracedError<E>: From<E>,
§type Instrumented = TracedError<E>
type Instrumented = TracedError<E>
§fn in_current_span(self) -> <E as InstrumentError>::Instrumented
fn in_current_span(self) -> <E as InstrumentError>::Instrumented
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].