middleware

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authorize added in v0.3.0

func Authorize(authz authorization.Authorizer, permission authorization.Permission) gin.HandlerFunc

Authorize returns a gin middleware that verifies the authenticated user holds the required permission according to the provided Authorizer.

It expects a prior middleware (e.g. CheckAuth) to have stored the authenticated user at the standard authorization.User context key. If no user is found in context, or the user lacks the permission, the request is aborted with 403.

func CorrelationID

func CorrelationID() gin.HandlerFunc

func ErrorResponse

func ErrorResponse() gin.HandlerFunc

func RequestLogger

func RequestLogger(logger *zerolog.Logger) gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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