authz

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrJWTMissing = errors.New("missing or malformed jwt")
	ErrNoOTP      = errors.New("2FA is required")
	ErrNoRole     = errors.New("access denied")
)

Functions

func Has

func Has(next http.HandlerFunc, roles ...models.Role) http.HandlerFunc

func Is

func Is(next http.HandlerFunc, roles ...models.Role) http.HandlerFunc

func IsAdmin

func IsAdmin(next http.HandlerFunc, roles ...models.Role) http.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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