From 8d82a03e90c930e4e832e94a54db1d21a297135a Mon Sep 17 00:00:00 2001 From: johnniang Date: Thu, 28 Mar 2019 10:36:52 +0800 Subject: [PATCH] Refactor admin authentication failure handler --- .../AdminAuthenticationFailureHandler.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/cc/ryanc/halo/security/handler/AdminAuthenticationFailureHandler.java b/src/main/java/cc/ryanc/halo/security/handler/AdminAuthenticationFailureHandler.java index 2b4b91219..e5346dd02 100644 --- a/src/main/java/cc/ryanc/halo/security/handler/AdminAuthenticationFailureHandler.java +++ b/src/main/java/cc/ryanc/halo/security/handler/AdminAuthenticationFailureHandler.java @@ -1,7 +1,13 @@ package cc.ryanc.halo.security.handler; +import cc.ryanc.halo.exception.HaloException; import com.fasterxml.jackson.databind.ObjectMapper; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + /** * Authentication failure handler. * @@ -13,8 +19,9 @@ public class AdminAuthenticationFailureHandler extends DefaultAuthenticationFail super(productionEnv, objectMapper); } -// @Override -// public void onFailure(HttpServletRequest request, HttpServletResponse response, HaloException exception) throws IOException, ServletException { -// // TODO handler the admin authentication failure. -// } + @Override + public void onFailure(HttpServletRequest request, HttpServletResponse response, HaloException exception) throws IOException, ServletException { + // TODO handler the admin authentication failure. + super.onFailure(request, response, exception); + } }