pub enum AuthError {
Internal(String),
ValidationError(String),
UsernameUnavailable,
InvalidCredentials,
AuthRepositoryError(String),
UserNotFound(String),
InvalidOperation(String),
Unathorized,
RoleAlreadyExists,
RoleNotFound(String),
}
Expand description
Errors connected to auth mechanisms
Variants§
Internal(String)
Auth problem connected with some internal error
ValidationError(String)
Validation error in auth’ domain
Provided username is unavailable
InvalidCredentials
Invalid credentials. This module returns such error in most cases when there are some problems with user validation to provide less information for potential intruder
AuthRepositoryError(String)
Error connected with UserRepository
UserNotFound(String)
User not found. Inner string represents info about user
InvalidOperation(String)
Current operation is invalid
Unathorized
User is unathorized
RoleAlreadyExists
Role with provided name is already exists
RoleNotFound(String)
Role not found. Inner string represents info about role
Trait Implementations§
Source§impl From<BcryptError> for AuthError
impl From<BcryptError> for AuthError
Source§fn from(error: BcryptError) -> Self
fn from(error: BcryptError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AuthError
impl RefUnwindSafe for AuthError
impl Send for AuthError
impl Sync for AuthError
impl Unpin for AuthError
impl UnwindSafe for AuthError
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