소스 정리

main
이범준 8 months ago
parent bf4011b1dc
commit c2cd784249

@ -51,6 +51,9 @@
</div> </div>
<jsp:include page="/WEB-INF/jsp/include/tail.jsp" /> <jsp:include page="/WEB-INF/jsp/include/tail.jsp" />
<!-- 자동 로그아웃 -->
<script src="<c:url value="/resources/3rd-party/sneat/libs/idletimer/idletimer.js?${ver}"/>"></script>
<c:set var="onload"> <c:set var="onload">
@ -65,6 +68,25 @@
const FETCH_XL = 500; const FETCH_XL = 500;
const FETCH_XXL = 1000; const FETCH_XXL = 1000;
//자동 로그아웃
const ONE_MINUTE = 60 * 1000;
let sessionConfig = 30 * ONE_MINUTE;
$.idleTimer(sessionConfig);
$(document).bind("idle.idleTimer", function(){
$.idleTimer('destroy');
ajax.post({
url : wctx.url("/logout.do"),
data : { "${_csrf.parameterName}" : "${_csrf.token}" },
success : async function(){
var ok = await alert2("세션이 종료되어 로그아웃되었습니다.");
if(ok){
location.href = wctx.url("/login.do");
}
}
});
});
var pageObject = {}; var pageObject = {};
pageObject.childReq = []; pageObject.childReq = [];
pageObject.parentRes = []; pageObject.parentRes = [];
@ -309,29 +331,5 @@
}); });
}); });
</script> </script>
<!-- 자동 로그아웃 -->
<script src="<c:url value="/resources/3rd-party/sneat/libs/idletimer/idletimer.js?${ver}"/>"></script>
<script>
const ONE_MINUTE = 60 * 1000;
let sessionConfig = 30 * ONE_MINUTE;
$.idleTimer(sessionConfig);
$(document).bind("idle.idleTimer", function(){
$.idleTimer('destroy');
ajax.post({
url : wctx.url("/logout.do"),
data : { "${_csrf.parameterName}" : "${_csrf.token}" },
success : async function(){
var ok = await alert2("세션이 종료되어 로그아웃되었습니다.");
if(ok){
location.href = wctx.url("/login.do");
}
}
});
});
</script>
</body> </body>
</html> </html>

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save