重写手动针对用户以及组织的单条同步逻辑

登录获取 token 时新增客户端编号标识
支持根据客户端编号以及用户id批量失效 token 方法
This commit is contained in:
chenbowen
2026-01-29 14:51:32 +08:00
parent 58df702cef
commit 9e98fa8c23
15 changed files with 109 additions and 305 deletions

View File

@@ -49,4 +49,13 @@ public interface OAuth2TokenCommonApi {
CommonResult<OAuth2AccessTokenRespDTO> refreshAccessToken(@RequestParam("refreshToken") String refreshToken,
@RequestParam("clientId") String clientId);
@DeleteMapping(PREFIX + "/remove-by-user")
@Operation(summary = "按 userId + clientId 失效访问令牌")
@Parameters({
@Parameter(name = "userId", description = "用户编号", required = true, example = "1"),
@Parameter(name = "clientId", description = "客户端编号", required = true, example = "default")
})
CommonResult<Boolean> removeAccessTokensByUserIdAndClientId(@RequestParam("userId") Long userId,
@RequestParam("clientId") String clientId);
}