middleware

package
v0.0.0-...-9bca149 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminOnly

func AdminOnly(c *fiber.Ctx) error

AdminOnly checks for "admin" claim in jwt token. This Middleware requires Protected() to be called in middleware chain before.

func ApplyPermissions

func ApplyPermissions(c *fiber.Ctx) error

This Middleware requires Protected() to be called in middleware chain before. Rolechecker checks "roles" claim in jwt token against permissions of the contenttype of the requested content Checks also for "admin" claim and passes if it is true

func Protected

func Protected() fiber.Handler

Protected protect routes

Types

This section is empty.

Jump to

Keyboard shortcuts

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