pub enum AuthProtocolError {
Show 15 variants
UnsupportedVersion {
received: u8,
supported: u8,
},
InvalidChallenge {
reason: String,
},
InvalidProof {
reason: String,
},
NonceMismatch {
expected: String,
received: String,
},
ChallengeExpired {
issued: String,
expiry: String,
now: String,
},
ReplayDetected {
nonce_hex: String,
},
SignatureVerificationFailed {
reason: String,
},
InvalidDidDocument {
did: String,
reason: String,
},
TransportFailed {
reason: String,
},
Timeout {
step: String,
timeout_secs: u64,
},
SerializationFailed {
message_type: String,
reason: String,
},
ExpiryTooLong {
requested_secs: u64,
max_secs: u64,
},
Internal(String),
SessionNotFound {
session_id: String,
},
SessionExpired {
session_id: String,
},
}Expand description
Errors arising from Core Protocol handshake operations.
Variants§
UnsupportedVersion
The protocol version in the received message is not supported.
Fields
InvalidChallenge
A challenge failed the Section 4 field constraints.
InvalidProof
A proof failed the Section 15.3 shape checks.
NonceMismatch
The nonce echoed in the proof does not match the challenge.
ChallengeExpired
The challenge nonce has expired (anti-replay protection).
Fields
ReplayDetected
A nonce was reused (replay attack detected).
SignatureVerificationFailed
Signature verification failed against the trusted key set.
InvalidDidDocument
The peer’s DID document is structurally invalid or missing required fields.
TransportFailed
The transport layer failed to send or receive a message.
Timeout
A timeout occurred waiting for a response from the peer.
SerializationFailed
Serialization or deserialization of a protocol message failed.
Fields
ExpiryTooLong
The challenge expiry duration exceeds the maximum allowed (300 seconds, per Section 7 of the Core Protocol Specification).
Internal(String)
An internal failure that is not the peer’s fault (e.g. a poisoned lock in a session store). Surfaced rather than panicked, per the workspace no-panic policy.
SessionNotFound
A presented session token does not identify a live session.
SessionExpired
A session exists but has expired and was removed.
Trait Implementations§
Source§impl Debug for AuthProtocolError
impl Debug for AuthProtocolError
Source§impl Display for AuthProtocolError
impl Display for AuthProtocolError
Source§impl Error for AuthProtocolError
impl Error for AuthProtocolError
1.30.0 · 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()