|
@@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
|
|
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
-import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
|
|
import cn.iocoder.yudao.framework.security.config.SecurityProperties;
|
|
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
|
|
import cn.iocoder.yudao.module.system.controller.admin.auth.vo.*;
|
|
@@ -66,7 +65,6 @@ public class AuthController {
|
|
|
@PostMapping("/login")
|
|
|
@PermitAll
|
|
|
@Operation(summary = "使用账号密码登录")
|
|
|
- @OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
|
|
public CommonResult<AuthLoginRespVO> login(@RequestBody @Valid AuthLoginReqVO reqVO) {
|
|
|
return success(authService.login(reqVO));
|
|
|
}
|
|
@@ -74,7 +72,6 @@ public class AuthController {
|
|
|
@PostMapping("/logout")
|
|
|
@PermitAll
|
|
|
@Operation(summary = "登出系统")
|
|
|
- @OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
|
|
public CommonResult<Boolean> logout(HttpServletRequest request) {
|
|
|
String token = SecurityFrameworkUtils.obtainAuthorization(request,
|
|
|
securityProperties.getTokenHeader(), securityProperties.getTokenParameter());
|
|
@@ -88,7 +85,6 @@ public class AuthController {
|
|
|
@PermitAll
|
|
|
@Operation(summary = "刷新令牌")
|
|
|
@Parameter(name = "refreshToken", description = "刷新令牌", required = true)
|
|
|
- @OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
|
|
public CommonResult<AuthLoginRespVO> refreshToken(@RequestParam("refreshToken") String refreshToken) {
|
|
|
return success(authService.refreshToken(refreshToken));
|
|
|
}
|
|
@@ -124,7 +120,6 @@ public class AuthController {
|
|
|
@PostMapping("/sms-login")
|
|
|
@PermitAll
|
|
|
@Operation(summary = "使用短信验证码登录")
|
|
|
- @OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
|
|
public CommonResult<AuthLoginRespVO> smsLogin(@RequestBody @Valid AuthSmsLoginReqVO reqVO) {
|
|
|
return success(authService.smsLogin(reqVO));
|
|
|
}
|
|
@@ -132,7 +127,6 @@ public class AuthController {
|
|
|
@PostMapping("/send-sms-code")
|
|
|
@PermitAll
|
|
|
@Operation(summary = "发送手机验证码")
|
|
|
- @OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
|
|
public CommonResult<Boolean> sendLoginSmsCode(@RequestBody @Valid AuthSmsSendReqVO reqVO) {
|
|
|
authService.sendSmsCode(reqVO);
|
|
|
return success(true);
|
|
@@ -156,7 +150,6 @@ public class AuthController {
|
|
|
@PostMapping("/social-login")
|
|
|
@PermitAll
|
|
|
@Operation(summary = "社交快捷登录,使用 code 授权码", description = "适合未登录的用户,但是社交账号已绑定用户")
|
|
|
- @OperateLog(enable = false) // 避免 Post 请求被记录操作日志
|
|
|
public CommonResult<AuthLoginRespVO> socialQuickLogin(@RequestBody @Valid AuthSocialLoginReqVO reqVO) {
|
|
|
return success(authService.socialLogin(reqVO));
|
|
|
}
|