middle

package
v0.0.0-...-d481519 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS() echo.MiddlewareFunc

func CreateJWTToken

func CreateJWTToken(key string) (string, error)

func HTTPCustomError

func HTTPCustomError(e error, c echo.Context)

func JWT

func JWT(key string, wl ...string) echo.MiddlewareFunc

func Logger

func Logger() echo.MiddlewareFunc

Types

type JWTClaim

type JWTClaim struct {
	jwtlib.StandardClaims
	SessID         int         `json:"sess_id"`
	User           UserJWT     `json:"user"`
	Lang           interface{} `json:"lang"`
	SessionSetting int         `json:"session_setting"`
}

type UserJWT

type UserJWT struct {
	ID            int    `json:"id"`
	Email         string `json:"email"`
	CompanyID     int    `json:"company_id"`
	UserCompanyID int    `json:"user_company_id"`
}

Jump to

Keyboard shortcuts

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