#[non_exhaustive]pub enum Erc8128Error {
Show 29 variants
InvalidUrl(String),
InvalidOptions(String),
InvalidHeaderValue(String),
InvalidDerivedValue(String),
InvalidFormat(String),
DigestError(String),
SigningFailed(String),
MissingHeaders,
LabelNotFound,
BadSignatureInput(String),
BadKeyId,
BadTime,
NotYetValid,
Expired,
ValidityTooLong,
ReplayableNotAllowed,
ReplayableInvalidationRequired,
ReplayableNotBefore,
ReplayableInvalidated,
NotRequestBound,
ClassBoundNotAllowed,
NonceWindowTooLong,
DigestRequired,
DigestMismatch,
BadSignatureBytes,
BadSignature,
Replay,
AlgNotAllowed,
VerificationFailed(String),
}Expand description
Errors produced by ERC-8128 signing and verification.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidUrl(String)
The request URL is not absolute or cannot be parsed.
InvalidOptions(String)
Sign/verify options are invalid (e.g. expires <= created).
InvalidHeaderValue(String)
A Structured Fields value contains forbidden characters.
InvalidDerivedValue(String)
A derived component (@method, @authority, …) produced non-visible-ASCII.
InvalidFormat(String)
A required field is empty or the overall format is wrong.
DigestError(String)
content-digest handling failed during signing.
SigningFailed(String)
The signer returned an empty or malformed signature.
MissingHeaders
Signature-Input / Signature headers are missing.
LabelNotFound
The requested signature label was not found.
BadSignatureInput(String)
Signature-Input / Signature could not be parsed.
BadKeyId
The keyid does not match erc8128:<chainId>:<address>.
BadTime
created / expires are missing, non-integer, or expires <= created.
NotYetValid
Signature is not yet valid (now + skew < created).
Expired
Signature has expired (now - skew > expires).
ValidityTooLong
expires - created exceeds the policy maximum.
ReplayableNotAllowed
Replayable (nonce-less) signature rejected by policy.
ReplayableInvalidationRequired
Replayable signature accepted but no invalidation mechanism is provided. Required by ERC-8128 Section 3.2.2 + 5.2.
ReplayableNotBefore
Replayable signature rejected: created before the per-key not_before cutoff.
ReplayableInvalidated
Replayable signature explicitly invalidated by policy hook.
NotRequestBound
Signed components do not satisfy request-bound requirements.
ClassBoundNotAllowed
Signed components do not match any class-bound policy.
NonceWindowTooLong
expires - created exceeds the nonce retention window.
DigestRequired
content-digest header required by components but missing.
DigestMismatch
content-digest value does not match the body.
BadSignatureBytes
Signature bytes could not be decoded (bad base64 or empty).
BadSignature
The signature is cryptographically invalid.
Replay
The nonce has already been consumed (replay detected).
AlgNotAllowed
Algorithm is not allowed by policy.
VerificationFailed(String)
The cryptographic verification call itself failed (e.g. RPC error).
Trait Implementations§
Source§impl Debug for Erc8128Error
impl Debug for Erc8128Error
Source§impl Display for Erc8128Error
impl Display for Erc8128Error
Source§impl Error for Erc8128Error
impl Error for Erc8128Error
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()