#[non_exhaustive]pub enum AuthTokenError {
AuthRequest {
source: Box<dyn Error + Send + Sync + 'static>,
},
AuthTokenNotInResponse,
AuthTokenNotString,
HeaderValue {
source: InvalidHeaderValue,
},
IdentityMethod {
auth_type: String,
},
IdentityMethodSync {
auth_type: String,
},
MissingAuthData,
MissingAuthUrl,
MultifactorAuthMethodsList,
Scope {
source: AuthTokenScopeError,
},
Serde {
source: Error,
},
Plugin {
source: Box<dyn Error + Send + Sync + 'static>,
},
}Expand description
AuthToken (X-Auth-Token) based auth errors
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.
AuthRequest
Auth request preparation error.
AuthTokenNotInResponse
Token is missing in the authentication response.
AuthTokenNotString
X-Subject-Token cannot be converted to string.
HeaderValue
Header error
Fields
§
source: InvalidHeaderValueIdentityMethod
Unsupported identity method
IdentityMethodSync
Unsupported identity method in sync mode
MissingAuthData
Auth data is missing
MissingAuthUrl
auth_url is missing
MultifactorAuthMethodsList
Multifactor auth_type requires auth_methods to be an array of strings.
Scope
Token Scope error
Fields
§
source: AuthTokenScopeErrorThe error source
Serde
(De)Serialization error.
Plugin
AuthPlugin error.
Implementations§
Trait Implementations§
Source§impl Debug for AuthTokenError
impl Debug for AuthTokenError
Source§impl Display for AuthTokenError
impl Display for AuthTokenError
Source§impl Error for AuthTokenError
impl Error for AuthTokenError
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<AuthTokenError> for AuthError
impl From<AuthTokenError> for AuthError
Source§fn from(source: AuthTokenError) -> Self
fn from(source: AuthTokenError) -> Self
Converts to this type from the input type.
Source§impl From<AuthTokenScopeError> for AuthTokenError
impl From<AuthTokenScopeError> for AuthTokenError
Source§fn from(source: AuthTokenScopeError) -> Self
fn from(source: AuthTokenScopeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for AuthTokenError
impl From<Error> for AuthTokenError
Source§impl From<InvalidHeaderValue> for AuthTokenError
impl From<InvalidHeaderValue> for AuthTokenError
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AuthTokenError
impl !RefUnwindSafe for AuthTokenError
impl Send for AuthTokenError
impl Sync for AuthTokenError
impl Unpin for AuthTokenError
impl UnsafeUnpin for AuthTokenError
impl !UnwindSafe for AuthTokenError
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