mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 18:20:50 +00:00
fix🐛: 移除 refresh_token 接口,修复 token 可无限续期问题
close #820 GET /api/v1/refresh_token 用业务 token 即可换取新 token,而续期上限 MaxRefresh 依据的 orig_iat 在每次续期时被一并重置,上限永远无法到达 —— token 一旦泄露即等同于永久访问权,且无任何吊销手段。 该路由此前还位于 CasbinExclude 中,不受 Casbin 约束,任何角色的已登录用户 都可调用。 官方前端从未使用它:store 中虽有 refreshToken action,但全仓库无一处 dispatch,属死代码。移除不影响正常登录与鉴权流程。 破坏性变更:自行调用该端点实现续期的使用者需改为重新登录。正确的无感续期 应在 go-admin-core 中区分 access token 与 refresh token 后重新实现,不应 沿用此路由。
This commit is contained in:
@@ -24,7 +24,6 @@ var CasbinExclude = []UrlInfo{
|
||||
{Url: "/api/v1/menuids", Method: "GET"},
|
||||
{Url: "/api/v1/roleMenuTreeselect/:roleId", Method: "GET"},
|
||||
{Url: "/api/v1/roleDeptTreeselect/:roleId", Method: "GET"},
|
||||
{Url: "/api/v1/refresh_token", Method: "GET"},
|
||||
{Url: "/api/v1/configKey/:configKey", Method: "GET"},
|
||||
{Url: "/api/v1/app-config", Method: "GET"},
|
||||
{Url: "/api/v1/user/profile", Method: "GET"},
|
||||
|
||||
Reference in New Issue
Block a user