authz

package
v0.0.0-...-c5fdaab Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnauthorized = clevergo.NewError(http.StatusUnauthorized, errors.New(http.StatusText(http.StatusUnauthorized)))
	ErrForbidden    = clevergo.NewError(http.StatusForbidden, errors.New("you are not allowed to access this page"))
)

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
	Skipper clevergo.Skipper
	// contains filtered or unexported fields
}

func New

func New(enforcer *casbin.Enforcer, userManager *users.Manager) *Authorization

func (*Authorization) Middleware

func (a *Authorization) Middleware() clevergo.MiddlewareFunc

Jump to

Keyboard shortcuts

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