middleware

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL