Help us shape the future of Go! Take the 2026 Go Developer Survey

jwt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJWT

func GenerateJWT(jwtSecret []byte, userId int64, exp int64) (string, error)

GenerateJWT 生成 JWT Token

func GenerateJWTCustom

func GenerateJWTCustom(jwtSecret []byte, userId any, exp int64) (string, error)

func ParseJWT

func ParseJWT(tokenString string, jwtSecret []byte) (int64, error)

ParseJWT 解析并验证 JWT Token

func ParseJWTCustom

func ParseJWTCustom(tokenString string, jwtSecret []byte) (any, error)

ParseJWT 解析并验证 JWT Token

Types

This section is empty.

Jump to

Keyboard shortcuts

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