增加认证日志

This commit is contained in:
2023-08-30 09:49:43 +08:00
parent 3ab0cb7be9
commit dbd4745763

View File

@@ -42,7 +42,7 @@ public class AuthExceptionHandler {
@ExceptionHandler(InvalidGrantException.class) @ExceptionHandler(InvalidGrantException.class)
public HttpResult<String> handleInvalidGrantException(HttpServletRequest httpServletRequest, InvalidGrantException invalidGrantException) { public HttpResult<String> handleInvalidGrantException(HttpServletRequest httpServletRequest, InvalidGrantException invalidGrantException) {
String loginName = invalidGrantException.getMessage(); String loginName = invalidGrantException.getMessage();
log.error("捕获用户名密码错误");
HttpResult<String> result = userFeignClient.updateUserLoginErrorTimes(loginName); HttpResult<String> result = userFeignClient.updateUserLoginErrorTimes(loginName);
if (result.getData().equals(UserResponseEnum.LOGIN_USER_LOCKED.getMessage())) { if (result.getData().equals(UserResponseEnum.LOGIN_USER_LOCKED.getMessage())) {
logService.recodeAuthExceptionLog(invalidGrantException, httpServletRequest, UserResponseEnum.LOGIN_USER_LOCKED.getMessage(), loginName); logService.recodeAuthExceptionLog(invalidGrantException, httpServletRequest, UserResponseEnum.LOGIN_USER_LOCKED.getMessage(), loginName);