Documentation
¶
Overview ¶
Package middleware provides HTTP middleware for extracting an authenticated principal from the request context and attaching it for downstream handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrincipalExtractionHandler ¶
func PrincipalExtractionHandler(principalExtractor auth.PrincipalExtractor) func(next http.Handler) http.Handler
PrincipalExtractionHandler returns middleware that extracts principal context, enriches request logs with principal fields (principal, auth_source), and stores the principal in the request context.
The middleware uses the request-scoped zerolog context logger for all log output, so log entries from this middleware automatically carry request_id and other fields injected by upstream middleware (e.g. requestIDMiddleware).
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package jwt provides HTTP middleware for authenticating requests with a bearer JWT and authorizing them against a claim predicate.
|
Package jwt provides HTTP middleware for authenticating requests with a bearer JWT and authorizing them against a claim predicate. |
|
Package oidc provides HTTP middleware for browser-based, cookie-backed OIDC login sessions: the login/callback/logout flow, session cookie management, and transparent token refresh.
|
Package oidc provides HTTP middleware for browser-based, cookie-backed OIDC login sessions: the login/callback/logout flow, session cookie management, and transparent token refresh. |
Click to show internal directories.
Click to hide internal directories.