pub enum SecurityError {
Show 34 variants
InvalidSignature(String),
ChallengeExpired(u64),
NonceMismatch {
expected: String,
actual: String,
},
InvalidPublicKey(String),
InvalidDeviceId(String),
KeypairError(String),
PeerNotAuthenticated(String),
AuthenticationFailed(String),
IoError(Error),
SerializationError(String),
Internal(String),
PeerNotFound(String),
PermissionDenied {
permission: String,
entity_id: String,
roles: Vec<String>,
},
CertificateError(String),
InvalidCertificateChain(String),
CertificateExpired(String),
CertificateRevoked(String),
UserNotFound {
username: String,
},
UserAlreadyExists {
username: String,
},
InvalidCredential {
username: String,
},
InvalidMfaCode,
AccountLocked {
username: String,
},
AccountDisabled {
username: String,
},
AccountPending {
username: String,
},
SessionNotFound,
SessionExpired,
UnsupportedAuthMethod {
method: String,
},
PasswordHashError {
message: String,
},
TotpError {
message: String,
},
EncryptionError(String),
DecryptionError(String),
KeyExchangeError(String),
NoGroupKey {
cell_id: String,
},
KeyGenerationMismatch {
expected: u64,
actual: u64,
},
}Expand description
Errors that can occur during security operations.
Variants§
InvalidSignature(String)
Invalid signature - verification failed
ChallengeExpired(u64)
Challenge has expired
NonceMismatch
Challenge nonce mismatch
InvalidPublicKey(String)
Invalid public key format
InvalidDeviceId(String)
Invalid device ID format
KeypairError(String)
Keypair error (generation, loading, saving)
PeerNotAuthenticated(String)
Peer not authenticated
AuthenticationFailed(String)
Authentication failed
IoError(Error)
IO error (file operations)
SerializationError(String)
Serialization error
Internal(String)
Internal error
PeerNotFound(String)
Peer not found
PermissionDenied
Permission denied for operation
CertificateError(String)
Certificate validation failed
InvalidCertificateChain(String)
Certificate chain invalid
CertificateExpired(String)
Certificate expired
CertificateRevoked(String)
Certificate revoked
UserNotFound
User not found in database
UserAlreadyExists
User already exists
InvalidCredential
Invalid credential (wrong password)
InvalidMfaCode
Invalid MFA code (TOTP)
AccountLocked
Account is locked (too many failed attempts)
AccountDisabled
Account is disabled by admin
AccountPending
Account is pending activation
SessionNotFound
Session not found
SessionExpired
Session expired
UnsupportedAuthMethod
Unsupported authentication method
PasswordHashError
Password hashing error
TotpError
TOTP generation/verification error
EncryptionError(String)
Encryption operation failed
DecryptionError(String)
Decryption operation failed
KeyExchangeError(String)
Key exchange failed
NoGroupKey
No group key for cell
KeyGenerationMismatch
Key generation mismatch
Implementations§
Source§impl SecurityError
impl SecurityError
Trait Implementations§
Source§impl Debug for SecurityError
impl Debug for SecurityError
Source§impl Display for SecurityError
impl Display for SecurityError
Source§impl Error for SecurityError
impl Error for SecurityError
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
use the Display impl or to_string()
Source§impl From<Error> for SecurityError
impl From<Error> for SecurityError
Source§fn from(source: Error) -> SecurityError
fn from(source: Error) -> SecurityError
Source§impl From<SecurityError> for Error
impl From<SecurityError> for Error
Source§fn from(err: SecurityError) -> Self
fn from(err: SecurityError) -> Self
Auto Trait Implementations§
impl Freeze for SecurityError
impl !RefUnwindSafe for SecurityError
impl Send for SecurityError
impl Sync for SecurityError
impl Unpin for SecurityError
impl UnsafeUnpin for SecurityError
impl !UnwindSafe for SecurityError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.