principal

package
v0.54.0 Latest Latest
Warning

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

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

Documentation

Overview

Package principal provides principal-based authorization middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerFunc

func HandlerFunc(cfg authz.PrincipalACLConfig, next http.Handler) http.HandlerFunc

HandlerFunc creates a principal-based authorization-wrapped HTTP handler function.

Types

type Handler

type Handler struct {
	Config authz.PrincipalACLConfig
}

Handler implements principal-based authorization for HTTP servers.

func NewHandler

func NewHandler(cfg authz.PrincipalACLConfig) *Handler

NewHandler creates a new principal-based authorization handler.

func (*Handler) AuthRequest

func (h *Handler) AuthRequest(r *http.Request) (stdctx.Context, error)

AuthRequest checks if the authenticated principal in the request context is authorized.

func (*Handler) Wrap

func (h *Handler) Wrap(handler http.Handler) http.Handler

Jump to

Keyboard shortcuts

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