rskit-auth 0.2.0-alpha.1

JWT, OIDC, password hashing, and request-context auth helpers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Stores and retrieves auth claims from request context.

/// Wrapper that carries typed claims in an axum request extension.
///
/// # Usage (axum)
///
/// ```rust,ignore
/// use rskit_auth::AuthClaims;
///
/// async fn my_handler(
///     axum::Extension(AuthClaims(claims)): axum::Extension<AuthClaims<MyClaims>>,
/// ) { /* … */ }
/// ```
#[derive(Debug, Clone)]
pub struct AuthClaims<C>(pub C);