Versions in this module Expand all Collapse all v0 v0.1.0 Jun 17, 2020 Changes in this version + var ErrForbidden = clevergo.NewError(http.StatusForbidden, errors.New("you are not allowed to access this page")) + var ErrUnauthorized = clevergo.NewError(http.StatusUnauthorized, errors.New(http.StatusText(http.StatusUnauthorized))) + func New(enforcer *casbin.Enforcer, userFunc UserFunc, opts ...Option) clevergo.MiddlewareFunc + type Option func(*authorization) + func WithSkipper(skipper clevergo.Skipper) Option + type UserFunc func(c *clevergo.Context) (id string, err error)