package
Version:
v0.0.0-...-c0e02ee
Opens a new window with list of versions in this module.
Published: Nov 29, 2024
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Init 设置包级别的配置 config, config 会用于本包后面的 token 签发和解析.
Parse 使用指定的密钥 key 解析 token,解析成功返回 token 上下文,否则报错.
ParseRequest 从请求头中获取令牌,并将其传递给 Parse 函数以解析令牌.
Sign 使用 jwtSecret 签发 token,token 的 claims 中会存放传入的 subject.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.