Skip to main content

Module auth

Module auth 

Source

Structs§

AuthMode
Auth configuration for the engine’s HTTP API.
JwksCache
Caches JWKS keys fetched from the OIDC provider. Keys are refreshed after JWKS_CACHE_TTL or on cache miss for a specific kid.
JwtConfig
JWT validation configuration.

Functions§

auth_middleware
Axum middleware that enforces authentication based on the configured mode.
generate_api_key
Generate a new random API key (32 bytes, hex-encoded).
hash_api_key
Hash an API key with SHA-256 for storage/lookup.
key_prefix
Extract the prefix (first 8 chars after “assay_”) for display.