From 9dfd7e28c1eb348fcb4a2de8c6faae2a01b34942 Mon Sep 17 00:00:00 2001 From: Ofir Sonsino Date: Wed, 20 Sep 2017 13:20:42 +0300 Subject: Global Read only role, Support VID specific Roles Issue-ID: VID-46 , VID-47 Change-Id: Ib100d20ac40a65d39e27a6e2741b19a173a2b8ea Signed-off-by: Ofir Sonsino --- .../src/test/resources/WEB-INF/jsp/login.jsp | 125 +++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 vid-app-common/src/test/resources/WEB-INF/jsp/login.jsp (limited to 'vid-app-common/src/test/resources/WEB-INF/jsp/login.jsp') diff --git a/vid-app-common/src/test/resources/WEB-INF/jsp/login.jsp b/vid-app-common/src/test/resources/WEB-INF/jsp/login.jsp new file mode 100644 index 00000000..804c0bfe --- /dev/null +++ b/vid-app-common/src/test/resources/WEB-INF/jsp/login.jsp @@ -0,0 +1,125 @@ +<%@ page import="java.net.URLEncoder"%> +<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%> +<% + // Requests are handled by class ProcessCspController in the EP-SDK-Core library. + // On login error, that controller returns a model that is a String->String map. + + // CSP property is defined in fusion.properties file + final String cspLoginUrl = SystemProperties.getProperty(SystemProperties.CSP_LOGIN_URL); + // Name is defined by app; do not throw if missing + final String appDisplayName = SystemProperties.containsProperty(SystemProperties.APP_DISPLAY_NAME) + ? SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME) + : SystemProperties.APP_DISPLAY_NAME; + // Build login-link URL using parameters and/or system properties + String returnUrl = request.getParameter("returnUrl"); + if (returnUrl == null) { + final String cspPage = "doLogin"; + if (SystemProperties.containsProperty(SystemProperties.APP_BASE_URL)) { + // Use property with the application URL; e.g., WebJunction + String appUrl = SystemProperties.getProperty(SystemProperties.APP_BASE_URL); + returnUrl = appUrl + (appUrl.endsWith("/") ? "" : "/") + cspPage; + } else { + // Use server info; incorrect for sites behind WebJunction. + returnUrl = (request.isSecure() ? "https://" : "http://") + request.getServerName() + ":" + + request.getServerPort() + request.getContextPath() + "/" + cspPage; + } + } else { + // Request has a parameter with the return URL + returnUrl = URLEncoder.encode(returnUrl, "UTF-8"); + } +%> + + + + + + + + + + + + + +
+
+
+
${model.error}
+
+
+
+
+
+
+ + + -- cgit 1.2.3-korg