#[non_exhaustive]pub enum AuthenticationError {
InvalidCredentials,
MfaCodeRequired,
OAuthError(Error),
InvalidResponse(Error),
UnsupportedChallenge(String),
SessionFailed,
}
Expand description
Errors which can occur when trying to authenticate with the Ring API.
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.
InvalidCredentials
The credentials provided were invalid.
MfaCodeRequired
Ring presented a MFA (Two Factor Authentication) challenge which require an SMS code to be sent to the user, and provided to the API.
This typically occurs when logging in with a username and password
(crate::authentication::Credentials::User
).
You can use respond_to_challenge
to
continue the authentication process once the SMS code has been captured.
OAuthError(Error)
An error occured with the Ring OAuth endpoint.
InvalidResponse(Error)
The response from the Ring OAuth API could not be decoded.
UnsupportedChallenge(String)
Ring presented a challenge which was not expected, and is currently not supported by the crate.
SessionFailed
Setting the session details with Ring failed.
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)>
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<Error> for AuthenticationError
impl From<Error> for AuthenticationError
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
Mutably borrows from an owned value. Read more