#[non_exhaustive]pub enum Error {
Codec(CodecError),
Store(StoreError),
Refresh(RefreshError),
Revoked,
PeerKeyMismatch,
InvalidInput(String),
}Expand description
Top-level cheers error. #[non_exhaustive] so new variants are non-breaking.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Codec(CodecError)
Failure inside the Codec layer.
Store(StoreError)
Failure inside a UserStore/CredentialStore/RefreshStore
impl.
Refresh(RefreshError)
Failure inside refresh-token rotation — surfaced by cheers-server’s
SessionAuthority::rotate.
Revoked
A token verified cryptographically but its jti is in the revocation
set — surfaced by cheers-verify’s EdgeVerifier.
PeerKeyMismatch
A token verified cryptographically but is not bound to the peer public
key the caller presented — either it carries no
peer_key at all, or it names a different
one. Surfaced by cheers-verify’s EdgeVerifier::verify_bound_at
(R515): the token holder is not the connecting peer.
InvalidInput(String)
Caller passed invalid input that no specific subsystem owns (e.g. an empty subject string, a timestamp outside i64 range).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()