<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page import="org.osgi.framework.BundleContext" %> <%@ page import="org.osgi.framework.ServiceReference" %> <%@ page import="de.virtimo.bpc.api.service.CoreBundleService" %> <%@ page import="de.virtimo.bpc.api.exception.*" %> <%@ page import="de.virtimo.bpc.api.SystemException" %> <%@ page import="java.util.Map" %> <%@ page import="java.util.HashMap" %> <%@ page import="java.util.logging.Logger" %> <%@ page import="java.util.logging.Level" %> <% boolean bpcShowError = false; boolean bpcBackendProblem = false; boolean userFlowProviderError = false; try { BundleContext ctx = null; ServiceReference ref = null; try { ctx = (BundleContext) getServletContext().getAttribute("osgi-bundlecontext"); ref = ctx.getServiceReference(CoreBundleService.class.getName()); CoreBundleService coreBundleService = (CoreBundleService) ctx.getService(ref); // redirect the user to the login page, but only when: // - keycloak/oidc is the used identity provider // - and it is not a "login done callback" from the identity provider // - and there is no valid user session if (coreBundleService.isUserFlowIdentityProviderInUse() && !coreBundleService.isUserFlowIdentityProviderCallback(request)) { if (!coreBundleService.hasValidUserSession(request)) { String redirectUrl = coreBundleService.getUserFlowIdentityProviderLoginRedirectUrl(request); out.write(""); out.write(""); out.write(""); out.write("Login Page Redirection"); out.write(""); out.write(""); out.write(""); out.write("If you are not redirected automatically, follow this link to login."); out.write(""); out.write(""); return; } } // get the theme config Map themeConfig = coreBundleService.getThemeConfig(request); pageContext.setAttribute("themeConfig", themeConfig); } finally { if (ctx != null && ref != null) { ctx.ungetService(ref); } } } catch (UserFlowIdentityProviderResponseException ex) { bpcShowError = true; userFlowProviderError = true; Map userFlowProviderErrorData = new HashMap<>(); userFlowProviderErrorData.put("error", ex.getError()); userFlowProviderErrorData.put("errorDescription", ex.getErrorDescription()); pageContext.setAttribute("userFlowProviderErrorData", userFlowProviderErrorData); } catch (Exception ex) { Logger.getLogger("index.jsp").log(Level.SEVERE, "index.jsp exception", ex); bpcShowError = true; bpcBackendProblem = true; } // values of java variables must be stored as a page attribute, otherwise the JSP-tags are not able to access the value! pageContext.setAttribute("bpcShowError", bpcShowError); pageContext.setAttribute("bpcBackendProblem", bpcBackendProblem); pageContext.setAttribute("userFlowProviderError", userFlowProviderError); %> <%-- Use the config to define title, if no definition is found, use the standard html --%> <c:out value="${themeConfig['appTitle']}"/> Virtimo Business Process Center <%-- Use the config to define description, if no definition is found, use the standard --%> "> <%-- Use the config to define favicon, if no definition is found, use the standard --%> ">
Message:

Backend not reachable. Please try again later. Thanks!

User flow provider error. Please check your IdP configuration. Thanks!

//window.history.replaceState(null,null,window.location.protocol + '//' + window.location.host + window.location.pathname)

Unknown error state!

<%-- Use the config to define loader icon, if no definition is found, use the standard --%>

Initialisiere BPC Framework