Expand description
Middleware for authentication, logging, and request processing
Structs§
- Authenticated
User - Authenticated identity extracted from token
- Rate
Limiter - Fixed-window per-subject rate limiter.
Functions§
- auth_
middleware - JWT authentication middleware
- browser_
provisioning_ rate_ limit_ middleware - Rate-limit the public browser-provisioning route before accepted-state resolution or hybrid projection signing. A single stable bucket is intentional: this boundary may run without trustworthy peer-address metadata, and client-controlled forwarding headers must not select buckets.
- cors_
layer - CORS middleware configuration
- extract_
iss_ from_ token - Extract the
issclaim from a JWT payload without signature verification. Exported for use in other middleware-like contexts (e.g. MCP inline auth). Returns an empty string on any parse failure. - extract_
kid_ from_ token - Extract
kidfrom a JWT header without full validation. - logging_
middleware - Request logging middleware
- public_
route_ rate_ limit_ middleware - Rate-limit public metadata and pre-upgrade routes with one stable bucket.
- rate_
limit_ middleware - Rate limiting middleware — enforces per-authenticated-subject request quotas.