| | |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; |
| | | import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; |
| | | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| | | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| | |
| | | @PostMapping("/sms-login") |
| | | @PermitAll |
| | | @Operation(summary = "使用短信验证码登录") |
| | | @ApiAccessLog(sanitizeKeys = {"code"}) // 验证码本身就是登录凭证,不能写进访问日志 |
| | | // 可按需开启限流:https://github.com/YunaiV/ruoyi-vue-pro/issues/851 |
| | | // @RateLimiter(time = 60, count = 6, keyResolver = ExpressionRateLimiterKeyResolver.class, keyArg = "#reqVO.mobile") |
| | | public CommonResult<AuthLoginRespVO> smsLogin(@RequestBody @Valid AuthSmsLoginReqVO reqVO) { |
| | |
| | | @PostMapping("/reset-password") |
| | | @PermitAll |
| | | @Operation(summary = "重置密码") |
| | | @ApiAccessLog(sanitizeKeys = {"code"}) // 验证码等价于重置密码的凭证,不能写进访问日志 |
| | | public CommonResult<Boolean> resetPassword(@RequestBody @Valid AuthResetPasswordReqVO reqVO) { |
| | | authService.resetPassword(reqVO); |
| | | return success(true); |