语言
/v1/jwt/generate
使用自定义负载创建 JWT,使用 HS256 使用密钥对其进行签名,并可选择设置过期时间(以秒为单位)。
The claims object to include in the JWT.
The secret key used to sign the token.
Token expiry in seconds. Defaults to 3600 (1 hour).
curl -X POST https://api.botoi.com/v1/jwt/generate \ -H "Content-Type: application/json" \ -d '{"payload":{"sub":"user_123","role":"admin"},"secret":"my-secret-key-123","expires_in":3600}'
生成具有特定声明和到期时间的 JWT,以测试您的 API 授权逻辑,而无需执行完整的登录流程。
在构建完整的身份验证服务之前,快速创建具有不同角色(管理员、编辑者、查看者)的令牌,以构建基于角色的访问控制原型。
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.