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.
usesuper::JwtClaims;/// Result of JWT validation.
#[derive(Debug)]pubenumJwtValidationResult<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,},}