From d288d06b3c3fcf0a77154dcbb8eae446b6d8ad61 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Wed, 7 Jun 2023 18:31:28 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EC=9C=A0=EC=A0=80=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/cmm/web/XitLoginController.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/java/kr/xit/fims/framework/biz/cmm/web/XitLoginController.java b/src/main/java/kr/xit/fims/framework/biz/cmm/web/XitLoginController.java index 08297633..15f5aabd 100644 --- a/src/main/java/kr/xit/fims/framework/biz/cmm/web/XitLoginController.java +++ b/src/main/java/kr/xit/fims/framework/biz/cmm/web/XitLoginController.java @@ -116,7 +116,6 @@ public class XitLoginController extends AbstractController { String message = null; - System.out.println("!!!e"); /** * 유효성 확인 * -비인증 상태에서 인가되지 않은 URL 호출에 대한 처리 @@ -125,10 +124,10 @@ public class XitLoginController extends AbstractController { */ //비인증 상태에서 인가되지 않은 URL 호출에 대한 처리 if(XitCmmnUtil.isEmpty(paraMap)) { - System.out.println("!!!f"); + return "forward:/login/accessDenied.do"; } - System.out.println("!!!g"); + /** * 처리 @@ -137,11 +136,11 @@ public class XitLoginController extends AbstractController { try { // 로그인 처리 xitLoginVO = xitLoginService.actionLogin(loginVO); - System.out.println("!!!h"); + } catch (Exception e) { log.debug(String.format("로그인 처리 실패 : %s", e.getMessage())); message = e.getMessage(); - System.out.println("!!!i"); + } @@ -150,7 +149,7 @@ public class XitLoginController extends AbstractController { */ // 로그인 정보/정책에 따라 응답페이지 분기 if (xitLoginVO != null && xitLoginVO.getId() != null && !"".equals(xitLoginVO.getId())) { - System.out.println("!!!j"); + // session Set request.getSession().setAttribute("XitLoginSession", xitLoginVO); @@ -164,27 +163,27 @@ public class XitLoginController extends AbstractController { springSecurity.setPasswordParameter("xit_security_password"); springSecurity.setRequiresAuthenticationRequestMatcher(new AntPathRequestMatcher( request.getServletContext().getContextPath() + "/xit_security_login", "POST")); - System.out.println("!!!l"); + } else { - System.out.println("!!!k"); + throw new IllegalStateException("No AuthenticationProcessingFilter"); } - System.out.println("!!!a"); + springSecurity.doFilter(new RequestWrapperForSecurity(request, xitLoginVO.getUniqId(), xitLoginVO.getPasswd()), response, null); - System.out.println("!!!b"); + xitLoginService.actionLoginSuccess();//로그인 Log 생성 // 2. 메인 페이지 이동 - System.out.println("!!!c"); + String url = this.getMainPageUrlByUserSe(); return "forward:"+url; // 성공 시 페이지.. (redirect 불가) } else { - System.out.println("!!!d"); + model.addAttribute("message", message==null?xitMessageSource.getMessage("fail.common.login"):message); return LOGIN_PAGE;