middleware

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppCors added in v0.0.5

func AppCors() echo.MiddlewareFunc

func AuthorizeJWT

func AuthorizeJWT(cfg config.Config) echo.MiddlewareFunc

func CacheWithRevalidation added in v0.0.6

func CacheWithRevalidation(next echo.HandlerFunc) echo.HandlerFunc

func GenerateJWT

func GenerateJWT(data CustomClaims, secretKey string) (string, error)

Types

type CustomClaims

type CustomClaims struct {
	UserID int64  `json:"user_id"`
	Email  string `json:"email"`
	jwt.StandardClaims
}

CustomClaims represents the custom claims you want to include in the JWT payload.

Jump to

Keyboard shortcuts

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