> For the complete documentation index, see [llms.txt](https://doc.duaer.com/zh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/build/jwt.md).

# 在 Duaer 里用 JWT 签发令牌

在 Duaer 里，JWT 默认 Operation 是 Sign。需要配置 jwtAuth 凭据。Use JSON to Build Payload 默认关闭。
## 签发一个 JWT

1. 先建好 jwtAuth 凭据（密钥或密钥对与算法）。
2. 搜索 JWT，接到上一个节点后面，选上凭据。
3. Operation 保持 Sign。
4. Use JSON to Build Payload 保持关闭时，在 Payload Claims 里填 Audience、Expires In（默认 3600 秒）等。
5. 点执行此步骤。输出里是签好的 token。

Operation 还可以是 Decode 或 Verify，此时填 Token。

打开 Use JSON to Build Payload 时，改用 Payload Claims (JSON)。
## Questions

### Duaer 的 JWT Decode 会校验签名吗？

Decode 只解析内容。要校验签名和时效，用 Verify，并配上对应凭据。

