jwtoken

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

* @Author: liziwei01 * @Date: 2022-04-13 23:40:04 * @LastEditors: liziwei01 * @LastEditTime: 2022-04-13 23:45:07 * @Description: file content

Index

Constants

View Source
const TokenExpireDuration = time.Hour * 1

set expire time

Variables

View Source
var JWTSecret = []byte("lib_jwt_secret")

jwt secret

Functions

func GenToken

func GenToken(username string) (string, error)

generate jwt token

Types

type MyClaims

type MyClaims struct {
	Username string `json:"username"`
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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