jwt

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JwtToken

type JwtToken struct {
	// contains filtered or unexported fields
}

func NewJwtToken

func NewJwtToken(secret string) *JwtToken

NewJwtToken is create jwt tonen generate.

func (*JwtToken) Generate

func (t *JwtToken) Generate(data interface{}, expire time.Duration) (string, error)

Generate 创建一个jwt

func (*JwtToken) ParseToken

func (t *JwtToken) ParseToken(tokenString string, data interface{}) error

ParseToken 验证一个jwt

Jump to

Keyboard shortcuts

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