From 256d6c334f4f4aa2f1de16f5da5ea4405b9ed202 Mon Sep 17 00:00:00 2001 From: vigneshan Date: Mon, 4 Jan 2021 12:13:54 +0530 Subject: [PATCH] Fix SLO issue --- .../entgra/ui/request/interceptor/SsoLogoutHandler.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLogoutHandler.java b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLogoutHandler.java index a3d8f0bcc0..d8e1a78bda 100644 --- a/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLogoutHandler.java +++ b/components/ui-request-interceptor/io.entgra.ui.request.interceptor/src/main/java/io/entgra/ui/request/interceptor/SsoLogoutHandler.java @@ -41,9 +41,9 @@ public class SsoLogoutHandler extends HttpServlet { protected void doPost(HttpServletRequest req, HttpServletResponse resp) { for (String path : HandlerConstants.SSO_LOGOUT_COOKIE_PATHS) { - removeCookie(HandlerConstants.JSESSIONID_KEY, System.getProperty("iot.core.host"), path, resp); + removeCookie(HandlerConstants.JSESSIONID_KEY, path, resp); } - removeCookie(HandlerConstants.COMMON_AUTH_ID_KEY, System.getProperty("iot.core.host"), "/", resp); + removeCookie(HandlerConstants.COMMON_AUTH_ID_KEY, "/", resp); ProxyResponse proxyResponse = new ProxyResponse(); proxyResponse.setCode(HttpStatus.SC_OK); @@ -58,11 +58,9 @@ public class SsoLogoutHandler extends HttpServlet { } } - private static void removeCookie(String cookieName, String domain, - String path, HttpServletResponse response) { + private static void removeCookie(String cookieName,String path, HttpServletResponse response) { Cookie cookie = new Cookie(cookieName, ""); cookie.setPath(path); - cookie.setDomain(domain); cookie.setValue(null); cookie.setMaxAge(0); response.addCookie(cookie);