pub enum ExternalAuthError {
Validation(String),
Config(String),
InvalidCredentials(String),
State(String),
Internal(String),
}Expand description
Error returned by shared external authentication providers.
Variants§
Validation(String)
Stored or submitted provider configuration is invalid.
Config(String)
Runtime configuration is missing or unsupported.
InvalidCredentials(String)
The provider rejected credentials, returned an invalid token, or exposed invalid profile data during an authentication flow.
State(String)
Stored login-flow state is incomplete or corrupted.
Internal(String)
Internal client setup or infrastructure failed.
Implementations§
Source§impl ExternalAuthError
impl ExternalAuthError
Sourcepub fn validation_error(message: impl Into<String>) -> Self
pub fn validation_error(message: impl Into<String>) -> Self
Creates a validation error.
Sourcepub fn config_error(message: impl Into<String>) -> Self
pub fn config_error(message: impl Into<String>) -> Self
Creates a configuration error.
Sourcepub fn auth_invalid_credentials(message: impl Into<String>) -> Self
pub fn auth_invalid_credentials(message: impl Into<String>) -> Self
Creates an invalid-credentials error.
Sourcepub fn state_error(message: impl Into<String>) -> Self
pub fn state_error(message: impl Into<String>) -> Self
Creates a stored-state error.
Sourcepub fn database_operation(message: impl Into<String>) -> Self
pub fn database_operation(message: impl Into<String>) -> Self
Compatibility constructor for code moved from product crates where missing login-flow state was reported through the database category.
Sourcepub fn internal_error(message: impl Into<String>) -> Self
pub fn internal_error(message: impl Into<String>) -> Self
Creates an internal error.
Trait Implementations§
Source§impl Debug for ExternalAuthError
impl Debug for ExternalAuthError
Source§impl Display for ExternalAuthError
impl Display for ExternalAuthError
Source§impl Error for ExternalAuthError
impl Error for ExternalAuthError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for ExternalAuthError
impl RefUnwindSafe for ExternalAuthError
impl Send for ExternalAuthError
impl Sync for ExternalAuthError
impl Unpin for ExternalAuthError
impl UnsafeUnpin for ExternalAuthError
impl UnwindSafe for ExternalAuthError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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