#[non_exhaustive]pub enum AuthenticationError {
AccessTokenNotValid,
UnsupportedChallenge(String),
LoginFailed(SdkError<InitiateAuthError>),
ChallengeFailed(SdkError<RespondToAuthChallengeError>),
MissingChallengeParameter(String),
SrpFailed(SrpError),
NextChallenge(ChallengeRequest),
DeviceConfirmationError(DeviceConfirmationError),
AuthenticationRefreshFailed,
NoAuthenticationInProgress,
NotLoggedIn,
DeviceAlreadyTrusted,
}
Expand description
Errors that can occur while trying to communicate with the Hive Authentication servers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessTokenNotValid
No Access Token was issued in the response from the Hive authentication servers.
UnsupportedChallenge(String)
The challenge presented by the Hive authentication servers is not supported by this crate.
LoginFailed(SdkError<InitiateAuthError>)
The request to begin the authentication flow failed.
ChallengeFailed(SdkError<RespondToAuthChallengeError>)
The request to respond to a challenge during the authentication flow failed.
MissingChallengeParameter(String)
A parameter which was expected to be present in the challenge was not found.
SrpFailed(SrpError)
An error occured while trying to complete the Secure Remote Password (SRP) authentication challenges.
NextChallenge(ChallengeRequest)
A challenge was requested by the Hive authentication servers which requires manual intervention.
For example, a SMS MFA code was sent to the user’s phone number.
DeviceConfirmationError(DeviceConfirmationError)
The request to confirm the device (to make it a crate::authentication::TrustedDevice
) failed.
AuthenticationRefreshFailed
The request to refresh the authentication tokens failed.
NoAuthenticationInProgress
There is no authentication flow currently in progress, and the user is not logged in.
NotLoggedIn
No authentication flow has been started.
DeviceAlreadyTrusted
The device being confirmed is already trusted, meaning no confirmation is needed.
Trait Implementations§
Source§impl Debug for AuthenticationError
impl Debug for AuthenticationError
Source§impl Display for AuthenticationError
impl Display for AuthenticationError
Source§impl Error for AuthenticationError
impl Error for AuthenticationError
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
Source§impl From<DeviceConfirmationError> for AuthenticationError
impl From<DeviceConfirmationError> for AuthenticationError
Source§fn from(source: DeviceConfirmationError) -> Self
fn from(source: DeviceConfirmationError) -> Self
Source§impl From<SdkError<InitiateAuthError, Response>> for AuthenticationError
impl From<SdkError<InitiateAuthError, Response>> for AuthenticationError
Source§fn from(source: SdkError<InitiateAuthError>) -> Self
fn from(source: SdkError<InitiateAuthError>) -> Self
Source§impl From<SdkError<RespondToAuthChallengeError, Response>> for AuthenticationError
impl From<SdkError<RespondToAuthChallengeError, Response>> for AuthenticationError
Source§fn from(source: SdkError<RespondToAuthChallengeError>) -> Self
fn from(source: SdkError<RespondToAuthChallengeError>) -> Self
Auto Trait Implementations§
impl !Freeze for AuthenticationError
impl !RefUnwindSafe for AuthenticationError
impl Send for AuthenticationError
impl Sync for AuthenticationError
impl Unpin for AuthenticationError
impl !UnwindSafe for AuthenticationError
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
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