package
Version:
v1.4.0
Opens a new window with list of versions in this module.
Published: Sep 20, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
Package jwtx 提供与传输无关的 JWT 签发和解析,
供 server 鉴权中间件和应用侧共用同一套语义。
Codec 同时提供签发和解析能力,对应同一算法和密钥。
Ed25519 从 PEM 编码的 PKCS#8 私钥构造签发和解析 EdDSA token 的 Codec,
解析侧使用私钥派生的公钥。
HS256 返回以对称密钥签发和解析 HS256 token 的 Codec。
Parser 按算法白名单和密钥函数解析并校验 token。
Parse 解析 token 并把结果解码到 claims;签名、算法和有效期校验失败均返回错误。
Signer 以指定算法和密钥签发 token。
Sign 签发指定 Claims 的 token。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.