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