From 8e83c25788017acd56271a72286f7dcbc974e76d Mon Sep 17 00:00:00 2001 From: Sudarshan Kumar Date: Tue, 18 Feb 2020 16:16:26 +0530 Subject: Changes made to upgrade pom version Upgraded pom version Issue-ID: PORTAL-769 Change-Id: I65ae68acda464531d699dcb459d328de19a3c7c7 Signed-off-by: Sudarshan Kumar --- .../org/onap/portalapp/util/SessionCookieUtil.java | 43 +--------------------- 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util') diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java index eaf9ec19..c00533b6 100644 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java @@ -50,13 +50,10 @@ import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; import org.onap.portalsdk.core.util.SystemProperties; import org.onap.portalsdk.core.web.support.AppUtils; -public class SessionCookieUtil { +public class SessionCookieUtil extends CommonSessionCookieUtil{ //private static final String JSESSIONID = "JSESSIONID"; - private static final String EP_SERVICE = "EPService"; private static final String USER_ID = "UserId"; - private static Integer cookieMaxAge = -1; - private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SessionCookieUtil.class); public static void preSetUp(HttpServletRequest request, HttpServletResponse response) { @@ -107,42 +104,4 @@ public class SessionCookieUtil { logger.info("************** session cookie util set up EP cookie completed"); return userId; } - - public static String getJessionId(HttpServletRequest request){ - - return request.getSession().getId(); - /* - Cookie ep = WebUtils.getCookie(request, JSESSIONID); - if(ep==null){ - return request.getSession().getId(); - } - return ep.getValue(); - */ - } - - protected static void initateSessionMgtHandler(HttpServletRequest request) { - String jSessionId = getJessionId(request); - storeMaxInactiveTime(request); - PortalTimeoutHandler.sessionCreated(jSessionId, jSessionId, AppUtils.getSession(request)); - } - - protected static void storeMaxInactiveTime(HttpServletRequest request) { - HttpSession session = AppUtils.getSession(request); - if(session.getAttribute(PortalApiConstants.GLOBAL_SESSION_MAX_IDLE_TIME) == null) - session.setAttribute(PortalApiConstants.GLOBAL_SESSION_MAX_IDLE_TIME,session.getMaxInactiveInterval()); - } - - public static void resetSessionMaxIdleTimeOut(HttpServletRequest request) { - try { - HttpSession session = AppUtils.getSession(request); - final Object maxIdleAttribute = session.getAttribute(PortalApiConstants.GLOBAL_SESSION_MAX_IDLE_TIME); - if(session != null && maxIdleAttribute != null) { - session.setMaxInactiveInterval(Integer.parseInt(maxIdleAttribute.toString())); - } - } catch (Exception e) { - logger.error(EELFLoggerDelegate.errorLogger, "resetSessionMaxIdleTimeOut failed", e); - } - - } - } -- cgit 1.2.3-korg