paseto_auth/
errors.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum PasetoError {
5    #[error("Invalid token format")]
6    InvalidFormat,
7    #[error("Footer does not match")]
8    InvalidFooter,
9    #[error("Signature verification failed")]
10    InvalidSignature,
11    #[error("Token has expired")]
12    Expired,
13    #[error("JSON error: {0}")]
14    Json(#[from] serde_json::Error),
15    #[error("Base64 error: {0}")]
16    Base64(#[from] base64::DecodeError),
17    #[error("Crypto  error: {0}")]
18    Crypto(#[from] ed25519_dalek::SignatureError),
19}