增加认证日志
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user