Expand description
axum auth-test helpers built on deterministic uselesskey fixtures.
This crate is intentionally test-focused and scoped to common drop-in needs:
- JWKS and OIDC discovery routers
- Bearer token verification middleware for tests
- Typed deterministic auth context extraction/injection
Structs§
- Auth
Expectations - Expected JWT shape for test verification.
- Deterministic
Jwks Phase - Deterministic signer + JWKS test fixture for one rotation phase.
- Mock
JwtVerifier State - Middleware verification state.
- Test
Auth Context - Typed auth context inserted by helpers and extracted in handlers.
Enums§
- Rotation
Phase - Deterministic JWT rotation phase.
Functions§
- inject_
auth_ context_ layer - Attach a middleware layer that injects a deterministic auth context without JWT parsing.
- jwks_
router - Build a JWKS router mounted at
/.well-known/jwks.json. - mock_
jwt_ verifier_ layer - Attach a middleware layer that verifies bearer tokens and inserts
TestAuthContext. - oidc_
router - Build an OIDC discovery router mounted at
/.well-known/openid-configuration.