pub enum PasswordLoginError {
InvalidUsernameOrPassword,
PasswordAuthenticationDataDerivation(MasterPasswordError),
Unknown(String),
}Expand description
Errors that can occur during password-based login.
This enum covers errors specific to the password authentication flow, including credential validation, KDF processing, and API communication errors.
Variants§
InvalidUsernameOrPassword
The username (email) or password provided was invalid.
This error is returned by the server when:
- The email address doesn’t exist in the system
- The master password hash doesn’t match the stored hash
§Note
For security reasons, the server doesn’t distinguish between “user not found” and “wrong password” to prevent user enumeration attacks.
PasswordAuthenticationDataDerivation(MasterPasswordError)
Failed to derive master password authentication data from the provided password and KDF settings.
This error can occur during local cryptographic processing before the API call when:
- The KDF parameters are invalid (e.g., iterations below minimum threshold)
- The KDF algorithm is unsupported or corrupted
- Memory allocation fails during Argon2id processing
Unknown(String)
An unknown or unexpected error occurred during login.
This variant captures errors that don’t fit other categories, including:
- Unexpected OAuth2 error codes from the server
- Network errors (timeouts, connection refused, DNS failures)
- Malformed server responses
- Future error types not yet handled by this SDK version
The contained string provides details about what went wrong.
§Forward Compatibility
This variant ensures the SDK can handle new error types introduced by the server without breaking existing client code.
Trait Implementations§
Source§impl<UT> ConvertError<UT> for PasswordLoginError
impl<UT> ConvertError<UT> for PasswordLoginError
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for PasswordLoginError
impl Debug for PasswordLoginError
Source§impl Display for PasswordLoginError
impl Display for PasswordLoginError
Source§impl Error for PasswordLoginError
impl Error for PasswordLoginError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl FlatError for PasswordLoginError
impl FlatError for PasswordLoginError
fn error_variant(&self) -> &'static str
Source§impl From<LoginErrorApiResponse> for PasswordLoginError
impl From<LoginErrorApiResponse> for PasswordLoginError
Source§fn from(error: LoginErrorApiResponse) -> Self
fn from(error: LoginErrorApiResponse) -> Self
Source§impl From<MasterPasswordError> for PasswordLoginError
impl From<MasterPasswordError> for PasswordLoginError
Source§impl From<PasswordLoginError> for JsValue
impl From<PasswordLoginError> for JsValue
Source§fn from(error: PasswordLoginError) -> Self
fn from(error: PasswordLoginError) -> Self
Source§impl<UT> Lift<UT> for PasswordLoginError
impl<UT> Lift<UT> for PasswordLoginError
Source§impl<UT> Lower<UT> for PasswordLoginError
impl<UT> Lower<UT> for PasswordLoginError
Source§impl<UT> LowerError<UT> for PasswordLoginError
impl<UT> LowerError<UT> for PasswordLoginError
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> TypeId<UT> for PasswordLoginError
impl<UT> TypeId<UT> for PasswordLoginError
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for PasswordLoginError
impl RefUnwindSafe for PasswordLoginError
impl Send for PasswordLoginError
impl Sync for PasswordLoginError
impl Unpin for PasswordLoginError
impl UnwindSafe for PasswordLoginError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> 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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.