이지우 - 로그인 관련 로컬,개발,운영 구분 처리
This commit is contained in:
parent
a7161f52a8
commit
d94b437ab3
@ -16,6 +16,7 @@ import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
@ -58,6 +59,10 @@ public class APILoginContoller {
|
||||
@Resource(name = "loginService")
|
||||
private EgovLoginService loginService;
|
||||
|
||||
/** 구동 환경 */
|
||||
@Value("#{property['Globals.prod.islocal']}")
|
||||
private String environment;
|
||||
|
||||
/**
|
||||
* @methodName : loginKeyChk
|
||||
* @author : 이지우
|
||||
@ -185,6 +190,9 @@ public class APILoginContoller {
|
||||
}
|
||||
byte[] postDataBytes = postData.toString().getBytes("UTF-8");
|
||||
URL obj = new URL("http://223.255.205.7/notdeco/mbrLinkSso.do");
|
||||
if("real".equals(environment)) {
|
||||
obj = new URL("https://edu-copyright.or.kr/notdeco/mbrLinkSso.do");
|
||||
}
|
||||
HttpURLConnection con = (HttpURLConnection)obj.openConnection();
|
||||
con.setRequestMethod("POST");
|
||||
con.setRequestProperty("Content-Length", String.valueOf(postDataBytes.length));
|
||||
|
||||
@ -365,10 +365,15 @@ public class EgovLoginController {
|
||||
model.addAttribute("beforeUrl", beforeUrl);
|
||||
model.addAttribute("message", message);
|
||||
model.addAttribute("environment", environment);
|
||||
//운영서버는 sso로그인 화면이 아닌 e배움터 로그인 화면으로 이동.
|
||||
if(!"local".equals(environment)) {
|
||||
//로컬은 셀렉트박스 로그인
|
||||
//개발은 e배움터 개발서버 로그인
|
||||
//운영은 e배움터 운영서버 로그인
|
||||
if("dev".equals(environment)) {
|
||||
return "redirect:http://223.255.205.7/user/member/loginForm.do?eduOff=Y";
|
||||
}
|
||||
if("real".equals(environment)) {
|
||||
return "redirect:https://edu-copyright.or.kr/user/member/loginForm.do?eduOff=Y";
|
||||
}
|
||||
// initRsa(request);
|
||||
if (test != null && test.equals("test")) {
|
||||
return "web/kccadr/login/SsoLoginUsr3";
|
||||
|
||||
@ -26,8 +26,12 @@ Globals.UserName= EDUSCE
|
||||
Globals.Password= edusce#23
|
||||
|
||||
Globals.DriverClassName=com.tmax.tibero.jdbc.TbDriver
|
||||
#\uac1c\ubc1c DB \uc11c\ubc84
|
||||
Globals.Url=jdbc:tibero:thin:@10.255.3.58:8629:copydb
|
||||
#\ub85c\uceec DB
|
||||
Globals.Url=jdbc:tibero:thin:@192.168.0.30:8633:tibero
|
||||
#\uc6b4\uc601 \uac1c\ubc1cDB
|
||||
#Globals.Url=jdbc:tibero:thin:@10.255.3.58:8629:copydb
|
||||
#\uc6b4\uc601 DB
|
||||
#Globals.Url=jdbc:tibero:thin:@172.17.0.10:8629:copydb
|
||||
|
||||
|
||||
# \uc800\uc791\uc704 \ubb38\uc790\uc804\uc1a1 DB(\uac1c\ubc1c)
|
||||
@ -147,9 +151,12 @@ Globals.pdf.webpath=/pdf/out/
|
||||
#Globals.pdf.webpath=/pdf/out/
|
||||
|
||||
#prod \uac1c\ubc1c, \uc2e4\uc11c\ubc84 \uad6c\ubd84\uac12
|
||||
#\uac1c\ubc1c\uc11c\ubc84
|
||||
#\ub85c\uceec
|
||||
#Globals.prod.islocal=local
|
||||
#\uc6b4\uc601 \uac1c\ubc1c
|
||||
#\uac1c\ubc1c \uc11c\ubc84 \ud14c\uc2a4\ud2b8\ub97c \uc704\ud574 DB\ub294 \ub85c\uceec\uc744 \ubc14\ub77c\ubcf4\uba70 \ub85c\uadf8\uc778\uc740 e\ubc30\uc6c0\ud130 \uc5f0\ub3d9 \ucc98\ub9ac\ub97c \uc704\ud574 islocal \uad6c\ubd84
|
||||
Globals.prod.islocal=dev
|
||||
#\uc2e4\uc11c\ubc84
|
||||
#\uc6b4\uc601
|
||||
#Globals.prod.islocal=real
|
||||
|
||||
|
||||
|
||||
@ -26,8 +26,12 @@ Globals.UserName= EDUSCE
|
||||
Globals.Password= edusce#23
|
||||
|
||||
Globals.DriverClassName=com.tmax.tibero.jdbc.TbDriver
|
||||
#\uac1c\ubc1c DB \uc11c\ubc84
|
||||
Globals.Url=jdbc:tibero:thin:@172.17.0.10:8629:copydb
|
||||
#\ub85c\uceec DB
|
||||
#Globals.Url=jdbc:tibero:thin:@192.168.0.30:8633:tibero
|
||||
#\uc6b4\uc601 \uac1c\ubc1cDB - \ud14c\uc2a4\ud2b8 \uc644\ub8cc \ud6c4 \uc6b4\uc601 DB\ub85c \ubcc0\uacbd \uc608\uc815
|
||||
Globals.Url=jdbc:tibero:thin:@10.255.3.58:8629:copydb
|
||||
#\uc6b4\uc601 DB
|
||||
#Globals.Url=jdbc:tibero:thin:@172.17.0.10:8629:copydb
|
||||
|
||||
|
||||
# \uc800\uc791\uc704 \ubb38\uc790\uc804\uc1a1 DB(\uac1c\ubc1c)
|
||||
@ -147,11 +151,12 @@ Globals.pdf.webpath=/pdf/out/
|
||||
#Globals.pdf.webpath=/pdf/out/
|
||||
|
||||
#prod \uac1c\ubc1c, \uc2e4\uc11c\ubc84 \uad6c\ubd84\uac12
|
||||
#\uac1c\ubc1c\uc11c\ubc84
|
||||
#\ub85c\uceec
|
||||
#Globals.prod.islocal=local
|
||||
#\uc2e4\uc11c\ubc84
|
||||
#\uc6b4\uc601 \uac1c\ubc1c
|
||||
#Globals.prod.islocal=dev
|
||||
#\uc6b4\uc601
|
||||
Globals.prod.islocal=real
|
||||
#Globals.prod.islocal=svr
|
||||
|
||||
|
||||
#\ub300\uc6a9\ub7c9 innorix license
|
||||
|
||||
@ -26,8 +26,12 @@ Globals.UserName= teduUr
|
||||
Globals.Password= tedu1234
|
||||
|
||||
Globals.DriverClassName=com.tmax.tibero.jdbc.TbDriver
|
||||
#\uac1c\ubc1c DB \uc11c\ubc84
|
||||
#\ub85c\uceec DB
|
||||
Globals.Url=jdbc:tibero:thin:@192.168.0.30:8633:tibero
|
||||
#\uc6b4\uc601 \uac1c\ubc1cDB
|
||||
#Globals.Url=jdbc:tibero:thin:@10.255.3.58:8629:copydb
|
||||
#\uc6b4\uc601 DB
|
||||
#Globals.Url=jdbc:tibero:thin:@172.17.0.10:8629:copydb
|
||||
|
||||
|
||||
# \uc800\uc791\uc704 \ubb38\uc790\uc804\uc1a1 DB(\uac1c\ubc1c)
|
||||
@ -147,9 +151,11 @@ Globals.pdf.webpath=/pdf/out/
|
||||
#Globals.pdf.webpath=/pdf/out/
|
||||
|
||||
#prod \uac1c\ubc1c, \uc2e4\uc11c\ubc84 \uad6c\ubd84\uac12
|
||||
#\uac1c\ubc1c\uc11c\ubc84
|
||||
#\ub85c\uceec
|
||||
Globals.prod.islocal=local
|
||||
#\uc2e4\uc11c\ubc84
|
||||
#\uc6b4\uc601 \uac1c\ubc1c
|
||||
#Globals.prod.islocal=dev
|
||||
#\uc6b4\uc601
|
||||
#Globals.prod.islocal=real
|
||||
|
||||
|
||||
|
||||
@ -124,6 +124,7 @@ function usrJoin(){
|
||||
}
|
||||
|
||||
function goEEdu() {
|
||||
var environment = ${environment};
|
||||
$.ajax({
|
||||
url : "<c:url value='/web/updateMberSeqKeyAjax.do'/>",
|
||||
async:false,
|
||||
@ -132,8 +133,11 @@ function usrJoin(){
|
||||
cache: false,
|
||||
success: function (returnData, status) {
|
||||
if(returnData.status == 'loginY'){
|
||||
window.location.href = "http://223.255.205.7/user/main/main.do?user_id="+returnData.user_id+"&key="+returnData.key;
|
||||
|
||||
if(environment eq 'real'){
|
||||
window.location.href = "http://https://edu-copyright.or.kr.255.205.7/user/main/main.do?user_id="+returnData.user_id+"&key="+returnData.key;
|
||||
}else{
|
||||
window.location.href = "http://223.255.205.7/user/main/main.do?user_id="+returnData.user_id+"&key="+returnData.key;
|
||||
}
|
||||
|
||||
} else if(returnData.status == 'fail') {
|
||||
alert("key 갱신 오류");
|
||||
@ -203,7 +207,7 @@ function usrJoin(){
|
||||
<p class="login_info"><a href="http://223.255.205.7/user/usrservice/selectUserSeView.do?eduOff=Y" class="header_join" title="새창열림"><i></i>회원가입</a></p> <!-- e-배움터 개발서버 -->
|
||||
</c:if>
|
||||
<!-- svr -->
|
||||
<c:if test="${environment eq 'svr' }">
|
||||
<c:if test="${environment eq 'real' }">
|
||||
<p class="login_info header_login_wrap"><a href="https://edu-copyright.or.kr/user/member/loginForm.do?eduOff=Y" class="header_login"><i></i>로그인</a></p> <!-- e-배움터 운영서버 -->
|
||||
<p class="login_info"><a href="https://edu-copyright.or.kr/user/usrservice/selectUserSeView.do?eduOff=Y" class="header_join" title="새창열림"><i></i>회원가입</a></p> <!-- e-배움터 운영서버 -->
|
||||
</c:if>
|
||||
@ -297,7 +301,7 @@ function usrJoin(){
|
||||
<button type="button" class="btn_mobile btn_login" onclick="location.href='http://223.255.205.7/user/member/loginForm.do?eduOff=Y'" title="로그인"></button>
|
||||
<button type="button" class="btn_mobile btn_join" onclick="location.href='http://223.255.205.7/user/usrservice/selectUserSeView.do?eduOff=Y'" title="회원가입"></button>
|
||||
</c:if>
|
||||
<c:if test="${environment eq 'svr' }">
|
||||
<c:if test="${environment eq 'real' }">
|
||||
<button type="button" class="btn_mobile btn_login" onclick="location.href='https://edu-copyright.or.kr/user/member/loginForm.do?eduOff=Y'" title="로그인"></button>
|
||||
<button type="button" class="btn_mobile btn_join" onclick="location.href='https://edu-copyright.or.kr/user/usrservice/selectUserSeView.do?eduOff=Y'" title="회원가입"></button>
|
||||
</c:if>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user