#[non_exhaustive]pub enum DeviceCodeLoginError {
NotRegistered,
NoDeviceAuthorizationEndpoint,
AccessDenied,
ExpiredToken,
OAuth(OAuthError),
DeviceAuthorization(BasicRequestTokenError<HttpClientError<Error>>),
RequestToken(RequestTokenError<HttpClientError<Error>, DeviceCodeErrorResponse>),
SessionLoad(Box<Error>),
}Expand description
All errors that can occur when logging in with the device authorization
grant, using OAuth::login_with_device_code().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotRegistered
The client is not registered with the OAuth 2.0 authorization server,
and no ClientRegistrationData was provided to register it.
NoDeviceAuthorizationEndpoint
The OAuth 2.0 authorization server doesn’t support the device
authorization grant, i.e. it doesn’t advertise a
device_authorization_endpoint in its metadata.
AccessDenied
The user denied the authorization request.
ExpiredToken
The device code expired before the user approved the authorization request.
OAuth(OAuthError)
A generic OAuth 2.0 error happened, for example while discovering the server metadata or registering the client.
DeviceAuthorization(BasicRequestTokenError<HttpClientError<Error>>)
An error happened while requesting a device authorization from the OAuth 2.0 authorization server.
RequestToken(RequestTokenError<HttpClientError<Error>, DeviceCodeErrorResponse>)
An error happened while waiting for the access token to be issued by the OAuth 2.0 authorization server.
SessionLoad(Box<Error>)
An error happened while loading the session after we obtained the access token, for example when discovering our user ID or setting up the stores.
Trait Implementations§
Source§impl Debug for DeviceCodeLoginError
impl Debug for DeviceCodeLoginError
Source§impl Display for DeviceCodeLoginError
impl Display for DeviceCodeLoginError
Source§impl Error for DeviceCodeLoginError
impl Error for DeviceCodeLoginError
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<DeviceAuthorizationOAuthError> for DeviceCodeLoginError
impl From<DeviceAuthorizationOAuthError> for DeviceCodeLoginError
Source§fn from(error: DeviceAuthorizationOAuthError) -> Self
fn from(error: DeviceAuthorizationOAuthError) -> Self
Source§impl From<Error> for DeviceCodeLoginError
impl From<Error> for DeviceCodeLoginError
Source§impl From<OAuthError> for DeviceCodeLoginError
impl From<OAuthError> for DeviceCodeLoginError
Source§fn from(error: OAuthError) -> Self
fn from(error: OAuthError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceCodeLoginError
impl !UnwindSafe for DeviceCodeLoginError
impl Freeze for DeviceCodeLoginError
impl Send for DeviceCodeLoginError
impl Sync for DeviceCodeLoginError
impl Unpin for DeviceCodeLoginError
impl UnsafeUnpin for DeviceCodeLoginError
Blanket Implementations§
impl<T> AsyncTraitDeps for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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