middleware

package
v0.0.0-...-543a005 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppCors

func AppCors() echo.MiddlewareFunc

func AuthorizeJWT

func AuthorizeJWT(cfg config.Config) echo.MiddlewareFunc

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