jwt_gl

package
v0.0.0-...-172868c Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP_COOKIE = "Token"
)

Variables

View Source
var JWT_KEY_BYTE = []byte(secretKey)
View Source
var SET_COOKIE_PATH = os.Getenv("SET_COOKIE_PATH")

Functions

func IsValidJWTStr

func IsValidJWTStr(tokenStr string) (res bool, err error)

Types

type Claims

type Claims struct {
	Email string `json:"email"`
	jwt.StandardClaims
}

type JWT

type JWT struct {
	Token          string
	ExperationTime time.Time
}

func GenerateJWTStr

func GenerateJWTStr(email string) (res *JWT, err error)

Jump to

Keyboard shortcuts

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