添加会话过期时间的环境变量配置;撤销令牌接口权限改为验证用户令牌

This commit is contained in:
2025-04-30 16:39:46 +08:00
parent fa356431ee
commit 1976baa164
4 changed files with 64 additions and 67 deletions

View File

@@ -268,7 +268,7 @@ type RevokeReq struct {
}
func Revoke(c *fiber.Ctx) error {
_, err := auth.Protect(c, []s.PayloadType{s.PayloadClientConfidential}, []string{})
_, err := auth.Protect(c, []s.PayloadType{s.PayloadUser}, []string{})
if err != nil {
// 用户未登录
return nil