middlewares

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AdminRoleKey = "chore_admin"
	UserRoleKey  = "chore_user"

	AdminRole = authecho.MiddlewareRole(authecho.WithRoles("chore_admin"))
	UserRole  = authecho.MiddlewareRole(authecho.WithRoles("chore_user", "chore_admin"))
	PatToken  = authecho.MiddlewareControl(PatTokenExist)

	DisableTokenCheck = "disable_token_check"
)

Functions

func IDFromBody

func IDFromBody(c echo.Context) string

func IDFromQuery

func IDFromQuery(c echo.Context) string

func JWTCheck

func JWTCheck(getID func(c echo.Context) string) func(next echo.HandlerFunc) echo.HandlerFunc

JWTCheck comes after the auth middleware to check ID's can have do that.

func PatTokenExist

func PatTokenExist(c echo.Context, claim *claims.Custom) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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