|
|
@@ -6,6 +6,7 @@ import javax.servlet.ServletException;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.core.Authentication;
|
|
|
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
|
|
@@ -68,6 +69,23 @@ public class TssLoginSuccessHandler implements AuthenticationSuccessHandler {
|
|
|
private void createSession(HttpServletRequest request, TssLoginDetails loginDetails) {
|
|
|
TssSession.getNewSess(request, -1);
|
|
|
TssSession.setAttribute(request, loginDetails);
|
|
|
+
|
|
|
+ // 입점업체이면서
|
|
|
+ if ("G001_B000".equals(loginDetails.getLoginInfo().getRoleCd())) {
|
|
|
+ // Header에 인증키가 있으면
|
|
|
+ String headerAuthKey = request.getHeader("x-auth-key");
|
|
|
+ log.info("x-auth-key: {}", headerAuthKey);
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(headerAuthKey)) {
|
|
|
+ String authKey = loginDetails.getLoginInfo().getAuthKey();
|
|
|
+
|
|
|
+ // 입점업체의 인증키와 Header의 인증키가 같으면 2factor인증 skip을 위한 2factor인증 세션을 true로 설정
|
|
|
+ if (authKey.equals(headerAuthKey)) {
|
|
|
+ log.info("x-auth-key is equal!!!");
|
|
|
+ TssSession.setAttribute("isTfcertify", "true");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|