From 4690a0958f00d096858c44d58a892fa48e12feaf Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Fri, 02 Feb 2018 10:52:11 +0800 Subject: [PATCH] 安全跨域设置 --- src/main/java/com/moral/security/auth/login/LoginAwareAuthenticationFailureHandler.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/moral/security/auth/login/LoginAwareAuthenticationFailureHandler.java b/src/main/java/com/moral/security/auth/login/LoginAwareAuthenticationFailureHandler.java index 8eeec89..1f943db 100644 --- a/src/main/java/com/moral/security/auth/login/LoginAwareAuthenticationFailureHandler.java +++ b/src/main/java/com/moral/security/auth/login/LoginAwareAuthenticationFailureHandler.java @@ -47,7 +47,7 @@ } else if (e instanceof AuthMethodNotSupportedException) { mapper.writeValue(response.getWriter(), ErrorResponse.of(e.getMessage(), ErrorCode.AUTHENTICATION, HttpStatus.UNAUTHORIZED)); } -// mapper.writeValue(response.getWriter(), ErrorResponse.of("Authentication failed", ErrorCode.AUTHENTICATION, HttpStatus.UNAUTHORIZED)); - mapper.writeValue(response.getWriter(), ErrorResponse.of(e.getMessage(), ErrorCode.AUTHENTICATION, HttpStatus.UNAUTHORIZED)); + mapper.writeValue(response.getWriter(), ErrorResponse.of("Authentication failed", ErrorCode.AUTHENTICATION, HttpStatus.UNAUTHORIZED)); +// mapper.writeValue(response.getWriter(), ErrorResponse.of(e.getMessage(), ErrorCode.AUTHENTICATION, HttpStatus.UNAUTHORIZED)); } } -- Gitblit v1.8.0