middleware

package module
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorized   = errors.Forbidden(reason, "unauthorized access")
	ErrMissingClaims  = errors.Forbidden(reason, "missing authz claims")
	ErrMissingSubject = errors.Forbidden(reason, "missing authz subject")
	ErrInvalidClaims  = errors.Forbidden(reason, "invalid authz claims")
)

Functions

func FromContext

func FromContext(ctx context.Context) (*engine.AuthClaims, bool)

func NewContext

func NewContext(ctx context.Context, claims *engine.AuthClaims) context.Context

func Server

func Server(authorizer engine.Authorizer, opts ...Option) middleware.Middleware

Types

type Option

type Option func(*options)

func WithLogger added in v1.1.5

func WithLogger(logger log.Logger) Option

Jump to

Keyboard shortcuts

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