|
|
@@ -1,8 +1,25 @@
|
|
|
package com.style24.front.biz.web;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
+import java.math.BigInteger;
|
|
|
+import java.security.SecureRandom;
|
|
|
+
|
|
|
+import javax.servlet.RequestDispatcher;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.servlet.http.HttpSession;
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.core.env.Environment;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.HttpRequestMethodNotSupportedException;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
+
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
-import com.gagaframework.web.parameter.GagaMap;
|
|
|
-import com.gagaframework.web.rest.server.GagaResponseStatus;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.front.biz.service.TsfCustomerService;
|
|
|
@@ -13,24 +30,11 @@ import com.style24.front.support.controller.TsfBaseController;
|
|
|
import com.style24.front.support.security.session.TsfSession;
|
|
|
import com.style24.persistence.domain.CustSnsInfo;
|
|
|
import com.style24.persistence.domain.Customer;
|
|
|
+
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.core.env.Environment;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.HttpRequestMethodNotSupportedException;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
-import javax.servlet.RequestDispatcher;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.servlet.http.HttpSession;
|
|
|
-import java.io.IOException;
|
|
|
-import java.math.BigInteger;
|
|
|
-import java.security.SecureRandom;
|
|
|
+import com.gagaframework.web.parameter.GagaMap;
|
|
|
+import com.gagaframework.web.rest.server.GagaResponseStatus;
|
|
|
|
|
|
/**
|
|
|
* Index Controller
|
|
|
@@ -72,7 +76,7 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
*/
|
|
|
@GetMapping("/error")
|
|
|
public ModelAndView error(HttpServletRequest request, HttpServletResponse response) throws HttpRequestMethodNotSupportedException, IOException {
|
|
|
- ModelAndView mav = new ModelAndView(super.getDeviceViewName("common/error/500"));
|
|
|
+ ModelAndView mav = new ModelAndView(super.getDeviceViewName("error/500"));
|
|
|
|
|
|
Object status = request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE);
|
|
|
|
|
|
@@ -162,8 +166,7 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
* @since 2021. 02. 23
|
|
|
*/
|
|
|
@GetMapping("/signin/kakologin")
|
|
|
- public String signinKaKaoLogin(@RequestParam(value = "rememberMe", required = false) String rememberMe
|
|
|
- , @RequestParam(value = "requestGb", required = false) String requestGb) {
|
|
|
+ public String signinKaKaoLogin(@RequestParam(value = "rememberMe", required = false) String rememberMe, @RequestParam(value = "requestGb", required = false) String requestGb) {
|
|
|
|
|
|
if (StringUtils.isNotBlank(rememberMe)) {
|
|
|
// RememberMe 세션 저장
|
|
|
@@ -188,8 +191,7 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
* @since 2021. 02. 23
|
|
|
*/
|
|
|
@GetMapping("/signin/naverlogin")
|
|
|
- public String signinNaverLogin(@RequestParam(value = "rememberMe", required = false) String rememberMe
|
|
|
- , @RequestParam(value = "requestGb", required = false) String requestGb) {
|
|
|
+ public String signinNaverLogin(@RequestParam(value = "rememberMe", required = false) String rememberMe, @RequestParam(value = "requestGb", required = false) String requestGb) {
|
|
|
|
|
|
if (StringUtils.isNotBlank(rememberMe)) {
|
|
|
// RememberMe 세션 저장
|
|
|
@@ -214,8 +216,7 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
* @since 2021. 02. 23
|
|
|
*/
|
|
|
@GetMapping("/signin/yes24login")
|
|
|
- public String signinYes24Login(@RequestParam(value = "rememberMe", required = false) String rememberMe
|
|
|
- , @RequestParam(value = "requestGb", required = false) String requestGb) {
|
|
|
+ public String signinYes24Login(@RequestParam(value = "rememberMe", required = false) String rememberMe, @RequestParam(value = "requestGb", required = false) String requestGb) {
|
|
|
|
|
|
if (StringUtils.isNotBlank(rememberMe)) {
|
|
|
// RememberMe 세션 저장
|
|
|
@@ -232,7 +233,6 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
return "redirect:" + redirectUrl;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* SNS 로그인
|
|
|
*
|
|
|
@@ -243,9 +243,7 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
* @since 2021. 02. 23
|
|
|
*/
|
|
|
@RequestMapping("/signin/snsLoginCallback")
|
|
|
- public ModelAndView signinSnsLoginCallback(@RequestParam(value = "snsType", required = false) String snsType, HttpSession session
|
|
|
- , @RequestParam(value = "code", required = false) String code, @RequestParam(value = "state", required = false) String state
|
|
|
- , @RequestParam(value = "error", required = false) boolean isError, HttpServletRequest request) {
|
|
|
+ public ModelAndView signinSnsLoginCallback(@RequestParam(value = "snsType", required = false) String snsType, HttpSession session, @RequestParam(value = "code", required = false) String code, @RequestParam(value = "state", required = false) String state, @RequestParam(value = "error", required = false) boolean isError, HttpServletRequest request) {
|
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
|
@@ -321,9 +319,8 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
return mav;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@RequestMapping("/signin/yes24LoginCallback")
|
|
|
- public ModelAndView yes24LoginCallback(@RequestParam("ipin")String ipin, HttpSession session, HttpServletRequest request) {
|
|
|
+ public ModelAndView yes24LoginCallback(@RequestParam("ipin") String ipin, HttpSession session, HttpServletRequest request) {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
boolean isSnsLoing = false;
|
|
|
GagaMap userInfo = new GagaMap();
|
|
|
@@ -334,7 +331,6 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
isSnsLoing = true;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
GagaMap resultMap = new GagaMap();
|
|
|
|
|
|
// SNS 로그인 성공시 정보 세션 저장
|
|
|
@@ -364,7 +360,7 @@ public class TsfIndexController extends TsfBaseController {
|
|
|
mav.addObject("resultMap", resultMap);
|
|
|
mav.setViewName(super.getDeviceViewName("SnsCallBackForm"));
|
|
|
|
|
|
- return mav;
|
|
|
+ return mav;
|
|
|
}
|
|
|
|
|
|
}
|