pub enum LoginErrorCode {
None,
RateLimited,
CredentialsInvalid,
AccountDenied,
TwoFactorRequired,
TwoFactorInvalid,
TwoFactorExpired,
TwoFactorMissing,
TwoFactorUnavailable,
TwoFactorDisabled,
}Expand description
Enumerates machine-readable login error codes.
Variants§
None
No error occurred for the outcome.
RateLimited
Too many attempts were made in a short period.
CredentialsInvalid
The submitted credentials did not match an account.
AccountDenied
The account is not permitted to authenticate.
TwoFactorRequired
The account requires a two-factor challenge before login succeeds.
TwoFactorInvalid
The provided two-factor code was invalid.
TwoFactorExpired
The two-factor challenge expired before completion.
TwoFactorMissing
No active two-factor challenge was found for the session.
Two-factor authentication is unavailable for the account.
TwoFactorDisabled
Two-factor authentication is disabled for the account.
Implementations§
Source§impl LoginErrorCode
impl LoginErrorCode
Sourcepub fn message(self) -> Option<AuthMessage>
pub fn message(self) -> Option<AuthMessage>
Returns the stable default message for this failure or challenge.
Trait Implementations§
Source§impl Clone for LoginErrorCode
impl Clone for LoginErrorCode
impl Copy for LoginErrorCode
Source§impl Debug for LoginErrorCode
impl Debug for LoginErrorCode
Source§impl Default for LoginErrorCode
impl Default for LoginErrorCode
Source§impl<'de> Deserialize<'de> for LoginErrorCode
impl<'de> Deserialize<'de> for LoginErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LoginErrorCode
Source§impl PartialEq for LoginErrorCode
impl PartialEq for LoginErrorCode
Source§impl Serialize for LoginErrorCode
impl Serialize for LoginErrorCode
impl StructuralPartialEq for LoginErrorCode
Auto Trait Implementations§
impl Freeze for LoginErrorCode
impl RefUnwindSafe for LoginErrorCode
impl Send for LoginErrorCode
impl Sync for LoginErrorCode
impl Unpin for LoginErrorCode
impl UnsafeUnpin for LoginErrorCode
impl UnwindSafe for LoginErrorCode
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