Documentation
¶
Index ¶
- func GetClient(ctx context.Context) (auth.Client, bool)
- func Require(l log.Logger, a Auth, p auth.Permission) func(http.Handler) http.Handler
- func RequireOne(l log.Logger, a Auth, hs ...PermissionHandler) http.Handler
- func SetClient(ctx context.Context, client auth.Client) context.Context
- type Auth
- type PermissionHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireOne ¶
Types ¶
type PermissionHandler ¶
type PermissionHandler interface {
HasPermission(c auth.Client) bool
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
func New ¶
func New(h http.Handler, p auth.Permission) PermissionHandler
Click to show internal directories.
Click to hide internal directories.