|
@@ -5,6 +5,7 @@ import com.its.op.config.JasyptConfig;
|
|
|
import com.its.op.dto.its.LoginDto;
|
|
|
import com.its.op.dto.its.common.UserInfoDto;
|
|
|
import com.its.op.dto.its.oper.UserMenuDto;
|
|
|
+import com.its.op.security.WebConstants;
|
|
|
import com.its.op.security.WebMvcConfig;
|
|
|
import com.its.op.service.its.LoginService;
|
|
|
import com.its.op.service.its.oper.TbUserInfrService;
|
|
@@ -73,8 +74,8 @@ public class LoginController {
|
|
|
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
|
|
if (auth != null) {
|
|
|
//log.info("getLogin3: auth, {}", auth.toString());
|
|
|
- expiredCookie(response, WebMvcConfig.USER_UUID);
|
|
|
- expiredCookie(response, WebMvcConfig.USER_TIME);
|
|
|
+ expiredCookie(response, WebConstants.USER_UUID);
|
|
|
+ expiredCookie(response, WebConstants.USER_TIME);
|
|
|
new SecurityContextLogoutHandler().logout(request, response, auth);
|
|
|
}
|
|
|
HttpSession session = request.getSession(false);
|
|
@@ -96,7 +97,7 @@ public class LoginController {
|
|
|
// else {
|
|
|
// HttpSession session = request.getSession(false);
|
|
|
// if (session != null) {
|
|
|
-// String encUserId = (String)session.getAttribute(WebMvcConfig.USER_UUID);
|
|
|
+// String encUserId = (String)session.getAttribute(WebConstants.USER_UUID);
|
|
|
// if (!"".equals(encUserId)) {
|
|
|
// userId = WebMvcConfig.decUserId(encUserId);
|
|
|
// }
|
|
@@ -113,8 +114,8 @@ public class LoginController {
|
|
|
String encUserId = "";
|
|
|
String loginHms = "";
|
|
|
if (cookies != null && cookies.length > 0) {
|
|
|
- encUserId = CookieUtils.getCookie(request, WebMvcConfig.USER_UUID);
|
|
|
- loginHms = CookieUtils.getCookie(request, WebMvcConfig.USER_TIME);
|
|
|
+ encUserId = CookieUtils.getCookie(request, WebConstants.USER_UUID);
|
|
|
+ loginHms = CookieUtils.getCookie(request, WebConstants.USER_TIME);
|
|
|
}
|
|
|
if (!"".equals(encUserId)) {
|
|
|
String userId = WebMvcConfig.decUserId(encUserId);
|
|
@@ -148,10 +149,10 @@ public class LoginController {
|
|
|
for (Cookie cookie : cookies) {
|
|
|
log.info("logout: {}, {}", cookie.getName(), cookie.getValue());
|
|
|
}
|
|
|
- encUserId = CookieUtils.getCookie(request, WebMvcConfig.USER_UUID);
|
|
|
- loginHms = CookieUtils.getCookie(request, WebMvcConfig.USER_TIME);
|
|
|
- expiredCookie(response, WebMvcConfig.USER_UUID);
|
|
|
- expiredCookie(response, WebMvcConfig.USER_TIME);
|
|
|
+ encUserId = CookieUtils.getCookie(request, WebConstants.USER_UUID);
|
|
|
+ loginHms = CookieUtils.getCookie(request, WebConstants.USER_TIME);
|
|
|
+ expiredCookie(response, WebConstants.USER_UUID);
|
|
|
+ expiredCookie(response, WebConstants.USER_TIME);
|
|
|
}
|
|
|
if (!"".equals(encUserId)) {
|
|
|
String userId = WebMvcConfig.decUserId(encUserId);
|
|
@@ -167,8 +168,8 @@ public class LoginController {
|
|
|
// if (auth != null) {
|
|
|
// // 여기로 안들어오네... 나중에 확인.....
|
|
|
// log.error("Authentication: {}", auth.toString());
|
|
|
-// expiredCookie(response, WebMvcConfig.USER_UUID);
|
|
|
-// expiredCookie(response, WebMvcConfig.USER_TIME);
|
|
|
+// expiredCookie(response, WebConstants.USER_UUID);
|
|
|
+// expiredCookie(response, WebConstants.USER_TIME);
|
|
|
// //new SecurityContextLogoutHandler().logout(request, response, auth);
|
|
|
// }
|
|
|
|