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.
Click to show internal directories.
Click to hide internal directories.