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 ¶
AuthRequest checks if the authenticated principal in the request context is authorized.
Click to show internal directories.
Click to hide internal directories.