middleware

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package middleware provides HTTP authorization middleware for Warden.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Require

func Require(eng *warden.Engine, action, resourceType string) forge.Middleware

Require enforces authorization. It resolves the subject from the request context (Authsome user > API key > anonymous) and checks whether the subject can perform the given action on the resource type.

func RequireAll

func RequireAll(eng *warden.Engine, checks ...warden.CheckRequest) forge.Middleware

RequireAll allows the request only if ALL checks pass.

func RequireAny

func RequireAny(eng *warden.Engine, checks ...warden.CheckRequest) forge.Middleware

RequireAny allows the request if ANY of the checks pass.

Types

This section is empty.

Jump to

Keyboard shortcuts

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