usso 0.2.1

The usso provides a universal single sign-on (SSO) integration for microservices, making it easy to add secure, scalable authentication across different frameworks. This client simplifies the process of connecting any microservice to the USSO service.
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
pub enum USSOError {
    #[error("Invalid signature")]
    InvalidSignature,
    #[error("Invalid token")]
    InvalidToken,
    #[error("Expired token")]
    ExpiredToken,
    #[error("Unauthorized")]
    Unauthorized,
    #[error("Invalid token type")]
    InvalidTokenType,
    #[error("Error: {0}")]
    Other(String),
}
#[derive(Error, Debug)]
pub enum JwksError {
    #[error("HTTP error: {0}")]
    ReqwestError(#[from] reqwest::Error),

    #[error("Invalid JWKS data: {0}")]
    InvalidJwksData(String),

    #[error("JWKS not initialized")]
    NotInitialized,
}
#[derive(Debug)]
pub enum JwtError {
    InvalidFormat,
    DecodingError(String),
    MissingField(String),
    InvalidToken(String),
}