package
Version:
v0.0.0-...-5ff450b
Opens a new window with list of versions in this module.
Published: Feb 4, 2022
License: MIT
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
GetPrincipal returns the authenticated user if exists.
MustGetPrincipal returns the authenticated user or an error if none exists.
RBAC adds role based access controll checks extracting roles from jwt.
NewRBAC creates a new RBAC struct with sane defaults.
Secure checks if a request was made with a jwt containing a specified list of roles.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.