Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAuthMiddleware ¶
MakeAuthMiddleware creates a middleware that checks the incoming request for the token cookie If no token cookie is set or the token does not exist in the user DB, an access denied page is displayed to the user
func MakePermissionMiddleware ¶
func MakePermissionMiddleware(permissions ...string) gin.HandlerFunc
MakePermissionMiddleware creates a middleware that will make sure that the incoming user has the given permissions before the request itself is handled. If the user does not have the correct permission, a HTTP 403 error is returned
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.