jwt

package
v0.0.0-...-04961f1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	AccessToken  string `json:"access_token"`
	AccessExpire int64  `json:"access_expire"`
}

Token : 表示生成的令牌及其过期时间

func BuildTokens

func BuildTokens(opt TokenOptions) (Token, error)

type TokenOptions

type TokenOptions struct {
	AccessSecret string
	AccessExpire int64
	Fields       map[string]interface{} //存储在token中的附加信息
}

TokenOptions 用于配置生成令牌的选项,包括密钥、过期时间和自定义字段

Jump to

Keyboard shortcuts

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