From 71c2b6dd1c9c377a831c2524aba3fff540fbb8d6 Mon Sep 17 00:00:00 2001 From: Rinjae Date: Thu, 27 Nov 2025 19:11:59 +0900 Subject: [PATCH] sso update --- WebContent/sso/app01.jsp | 15 +++++------ WebContent/sso/config.jsp | 2 ++ WebContent/sso/login_exec.jsp | 50 ++++++++++++++++------------------- 3 files changed, 32 insertions(+), 35 deletions(-) diff --git a/WebContent/sso/app01.jsp b/WebContent/sso/app01.jsp index e75459cb..d0bdd9b9 100644 --- a/WebContent/sso/app01.jsp +++ b/WebContent/sso/app01.jsp @@ -1,5 +1,4 @@ -<%@ page language="java" contentType="text/html; charset=EUC-KR" - pageEncoding="EUC-KR"%> +<%@ page language="java" contentType="text/html; charset=UTF8" pageEncoding="UTF-8"%> <% @@ -11,18 +10,18 @@ %> - + - * 사용자ID + * �궗�슜�옄ID <%=user_id%> @@ -33,13 +32,13 @@ - * 확장정보 + * �솗�옣�젙蹂� <%=ext_info%> - * 인증토큰 상태 - retCode = [<%=retCode%>] (1000:누락, 1001:시간, 1002:비정상) + * �씤利앺넗�겙 �긽�깭 + retCode = [<%=retCode%>] (1000:�늻�씫, 1001:�떆媛�, 1002:鍮꾩젙�긽) diff --git a/WebContent/sso/config.jsp b/WebContent/sso/config.jsp index 943b774b..628e0a85 100644 --- a/WebContent/sso/config.jsp +++ b/WebContent/sso/config.jsp @@ -1,3 +1,4 @@ +<%@ page language="java" contentType="text/html;charset=UTF-8" %> <%@ page import="sun.misc.*, java.util.*, @@ -294,3 +295,4 @@ System.out.println("nxef==="+ (String) nxef.getValue() ) ; } %> +Config \ No newline at end of file diff --git a/WebContent/sso/login_exec.jsp b/WebContent/sso/login_exec.jsp index 9a129286..b5a14edd 100644 --- a/WebContent/sso/login_exec.jsp +++ b/WebContent/sso/login_exec.jsp @@ -1,5 +1,6 @@ -<%@ page language="java" contentType="text/html;charset=EUC-KR" %> +<%@ page language="java" contentType="text/html;charset=UTF-8" %> <%@ include file="./config.jsp" %> +test-1
<% String uurl = null; @@ -7,43 +8,46 @@ String service_id = null; String ext_info = null; String retCode = null; - //http://test.kjbank.com:8080/se/login_exec.jsp : 꼭 도메인으로 호출해야 된다. - //1.SSO ID 수신 + //http://test.kjbank.com:8080/se/login_exec.jsp : 瑗� �룄硫붿씤�쑝濡� �샇異쒗빐�빞 �맂�떎. + //1.SSO ID �닔�떊 sso_id = getSsoId(request); - // 2. UURL 수신 + // 2. UURL �닔�떊 uurl = request.getParameter("UURL"); if (sso_id == null) { - //uurl 이 없다면, 근데 여기서 uurl 은 뭘 체크하는거지? uurl 에 test.kjbank.com:8080/se/login_exec.jsp 를 넣는구나. + //uurl �씠 �뾾�떎硫�, 洹쇰뜲 �뿬湲곗꽌 uurl ��� 萸� 泥댄겕�븯�뒗嫄곗��? uurl �뿉 test.kjbank.com:8080/se/login_exec.jsp 瑜� �꽔�뒗援щ굹. if (uurl == null) uurl = ASCP_URL; - // 3. SSO 인증 정보가 없으면 통합 로그인 페이지로 이동 - goLoginPage(response, uurl); + // 3. SSO �씤利� �젙蹂닿�� �뾾�쑝硫� �넻�빀 濡쒓렇�씤 �럹�씠吏�濡� �씠�룞 + out.println("go sso login"); + //goLoginPage(response, uurl); return; } else { - //4.쿠키 유효성 확인 :0(정상) + //4.荑좏궎 �쑀�슚�꽦 �솗�씤 :0(�젙�긽) retCode = getEamSessionCheck(request,response); + out.println("retCode : " + retCode); if(!retCode.equals("0")){ - goErrorPage(response, Integer.parseInt(retCode)); + out.println("go error page"); + //goErrorPage(response, Integer.parseInt(retCode)); return; } /*********************************************************************************** * < TO-DO > - * SSO 통합 인증이 완료되었으므로, 업무 시스템 로그인은 건너뛰도록 코드를 수정합니다. - * SSO 에서 제공한 사번은 sso_id 변수에 저장되어 있습니다. - * 시스템에서 필요로 하는 세션 정보를 세팅 코드를 여기에 작성합니다. + * SSO �넻�빀 �씤利앹씠 �셿猷뚮릺�뿀�쑝誘�濡�, �뾽臾� �떆�뒪�뀥 濡쒓렇�씤��� 嫄대꼫�쎇�룄濡� 肄붾뱶瑜� �닔�젙�빀�땲�떎. + * SSO �뿉�꽌 �젣怨듯븳 �궗踰덉�� sso_id 蹂��닔�뿉 ����옣�릺�뼱 �엳�뒿�땲�떎. + * �떆�뒪�뀥�뿉�꽌 �븘�슂濡� �븯�뒗 �꽭�뀡 �젙蹂대�� �꽭�똿 肄붾뱶瑜� �뿬湲곗뿉 �옉�꽦�빀�땲�떎. ************************************************************************************/ - //5 확장 정보 조회 + //5 �솗�옣 �젙蹂� 議고쉶 ext_info = getUserExField(sso_id, "CELLPHONENO"); service_id = SERVICE_NAME; out.println ("SERVICE_NAME : " + service_id); // - //6.업무시스템에 읽을 사용자 아이디를 세션으로 생성 - /* 변경 전 + //6.�뾽臾댁떆�뒪�뀥�뿉 �씫�쓣 �궗�슜�옄 �븘�씠�뵒瑜� �꽭�뀡�쑝濡� �깮�꽦 + /* 蹂�寃� �쟾 String EAM_ID = (String)session.getAttribute("SSO_ID"); if(EAM_ID == null || EAM_ID.equals("")) { session.setAttribute("SSO_ID", sso_id); @@ -54,7 +58,7 @@ */ - /*변경 후*/ + /*蹂�寃� �썑*/ if(!sso_id.replace(" ", "").equals("")) { session.setAttribute("SSO_ID", sso_id); session.setAttribute("APP_ID", service_id); @@ -66,19 +70,11 @@ out.println ("EXT_INFO : " + ext_info); out.println ("RET_CODE : " + retCode); out.println ("ext_info : " + ext_info); - - Properties info = ssoModule.getUserInfos(ssoId); - if (info != null) { - out.println("info - " + info.keySet()); - info.keySet().forEach( k -> { - out.println(k + " - " + info.get(k)); - }); - } else { - out.println("User info is null"); - } } + + out.println("go app"); - //7.업무시스템 페이지 호출(세션 페이지 또는 메인페이지 지정) --> 업무시스템에 맞게 URL 수정! + //7.�뾽臾댁떆�뒪�뀥 �럹�씠吏� �샇異�(�꽭�뀡 �럹�씠吏� �삉�뒗 硫붿씤�럹�씠吏� 吏��젙) --> �뾽臾댁떆�뒪�뀥�뿉 留욊쾶 URL �닔�젙! //response.sendRedirect(SERVER_URL + ":" + SERVER_PORT + "/se/app01.jsp"); } %>