middleware

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package middleware provides Gin middleware for admin-api's route groups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteAuth

func WriteAuth(client *authz.Client) gin.HandlerFunc

WriteAuth requires a forwarded user bearer token carrying the admin role, verified against auth-api's /authz/check. On success, the resolved canonical user ID is stashed in the context (read via authz.Viewer(c)) for handlers to attribute their audit records to. Fails closed if the acting user cannot be resolved to a canonical ID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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