From 8b1813ea228048b6795c4a1c09b05480d5a59cb4 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 19 Dec 2017 13:55:23 +0100 Subject: update interface of DefaultGUIFormBuilderConfiguration, because putCustomParameter(...) implementation only support values of type String --- .../at/gv/egovernment/moa/id/moduls/AuthenticationManager.java | 2 +- .../auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java | 7 ++----- .../moa/id/auth/modules/ssotransfer/utils/GUIUtils.java | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java index aaa57fb1d..7f183c5eb 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java @@ -632,7 +632,7 @@ public class AuthenticationManager extends MOAIDAuthConstants { config.putCustomParameterWithOutEscaption("redirectURLs", sloReqList); config.putCustomParameterWithOutEscaption("timeoutURL", timeOutURL); - config.putCustomParameter("timeout", SLOTIMEOUT); + config.putCustomParameter("timeout", String.valueOf(SLOTIMEOUT)); guiBuilder.build(httpResp, config, "Single-LogOut GUI"); diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java index 901dbae53..8cc7040dc 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java @@ -91,14 +91,11 @@ public class DefaultGUIFormBuilderConfiguration extends AbstractGUIFormBuilderCo * @param key velocity context key * @param value of this key */ - public void putCustomParameter(String key, Object value) { + public void putCustomParameter(String key, String value) { if (customParameters == null) customParameters = new HashMap(); - if (value instanceof String) - customParameters.put(key, StringEscapeUtils.escapeHtml((String)value)); - else - customParameters.put(key, StringEscapeUtils.escapeHtml(value.toString())); + customParameters.put(key, StringEscapeUtils.escapeHtml(value)); } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java index 5c66f257d..9cfe12791 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java @@ -106,7 +106,7 @@ public class GUIUtils { config.putCustomParameter("QRImage", base64EncodedImage); config.putCustomParameterWithOutEscaption("successMsg", "Select the SSO Session in your SSO-Transfer App and scan the QR-Code to start the process."); config.putCustomParameterWithOutEscaption("timeoutURL", containerURL); - config.putCustomParameter("timeout", REFESH_TIMEOUT); + config.putCustomParameter("timeout", String.valueOf(REFESH_TIMEOUT)); guiBuilder.build(response, config, "SSO-Transfer-Module"); -- cgit v1.2.3