axum-gate 1.1.0

Flexible authentication and authorization for Axum with JWT cookies or bearer tokens, optional OAuth2, and role/group/permission RBAC. Suitable for single-node and distributed systems.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::JwtClaims;

/// Result of JWT validation.
#[derive(Debug)]
pub enum JwtValidationResult<T> {
    /// Token is valid and contains the decoded claims.
    Valid(JwtClaims<T>),
    /// Token could not be decoded (invalid format, expired, etc.).
    InvalidToken,
    /// Token is valid but has wrong issuer.
    InvalidIssuer {
        /// The expected issuer value.
        expected: String,
        /// The actual issuer value found in the token.
        actual: String,
    },
}