|
@@ -63,6 +63,21 @@ public class AppAuthController {
|
|
return success(true);
|
|
return success(true);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @PostMapping("/deleteUser")
|
|
|
|
+ @Operation(summary = "用户注销")
|
|
|
|
+ @Parameter(name = "deleteUser", description = "用户注销", required = true)
|
|
|
|
+ public CommonResult<Boolean> deleteUser(HttpServletRequest request){
|
|
|
|
+ authService.deleteUser(getLoginUserId());
|
|
|
|
+
|
|
|
|
+ String token = SecurityFrameworkUtils.obtainAuthorization(request,
|
|
|
|
+ securityProperties.getTokenHeader(), securityProperties.getTokenParameter());
|
|
|
|
+ if (StrUtil.isNotBlank(token)) {
|
|
|
|
+ authService.logout(token);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return success(true);
|
|
|
|
+ }
|
|
|
|
+
|
|
@PostMapping("/refresh-token")
|
|
@PostMapping("/refresh-token")
|
|
@Operation(summary = "刷新令牌")
|
|
@Operation(summary = "刷新令牌")
|
|
@Parameter(name = "refreshToken", description = "刷新令牌", required = true)
|
|
@Parameter(name = "refreshToken", description = "刷新令牌", required = true)
|