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 用于配置生成令牌的选项,包括密钥、过期时间和自定义字段
Click to show internal directories.
Click to hide internal directories.