middleware

package
v0.0.0-...-1561af3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contexter

func Contexter(next echo.HandlerFunc) echo.HandlerFunc

func ValidateToken

func ValidateToken() echo.MiddlewareFunc

Types

type Claims

type Claims struct {
	FullName string `json:"full_name"`
	UserCode string `json:"user_code"`
	Role     string `json:"role"`
	jwt.StandardClaims
}

Create a struct that will be encoded to a JWT. We add jwt.StandardClaims as an embedded type, to provide fields like expiry time.

Jump to

Keyboard shortcuts

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