tokenutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(userId string, project string, jwtKey []byte) (string, error)

GenerateToken 生成 token

Types

type Claims

type Claims struct {
	jwt.RegisteredClaims

	UserId  string `json:"user_id"`
	Project string `json:"project"`
}

func ParseToken

func ParseToken(tokenStr string, jwtKey []byte) (*Claims, error)

Jump to

Keyboard shortcuts

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