jwts

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(method jwt.SigningMethod, subject string, id int64, secret string, expired int64) (string, error)

GenerateToken 生成token

func GenerateTokenByLong

func GenerateTokenByLong(method jwt.SigningMethod, id int64, secret string, expired int64) (string, error)

GenerateTokenByLong 生成token

func GenerateTokenByString

func GenerateTokenByString(method jwt.SigningMethod, subject string, secret string, expired int64) (string, error)

GenerateTokenByString 生成token

func ParseToken

func ParseToken(tokenStr string, secret string) (*jwt.RegisteredClaims, error)

ParseToken 解析token

Types

This section is empty.

Jump to

Keyboard shortcuts

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