From cce52b9d46fc9e9f13c388362c4ca229b7a053b1 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 25 Mar 2014 17:06:18 +0100 Subject: incorporated settings into frontend --- .../egovernment/moa/id/auth/builder/LoginFormBuilder.java | 12 ++++++++++++ .../gv/egovernment/moa/id/config/auth/OAAuthParameter.java | 7 ++++--- .../main/resources/resources/templates/loginFormFull.html | 14 ++------------ 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java index ff3b7b170..c244b64e9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java @@ -34,6 +34,8 @@ import java.net.URISyntaxException; import org.apache.commons.io.IOUtils; +import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead; +import at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS; import at.gv.egovernment.moa.id.config.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; @@ -56,6 +58,7 @@ public class LoginFormBuilder { private static String BKU_LOCAL = "#LOCAL#"; public static String CONTEXTPATH = "#CONTEXTPATH#"; private static String MOASESSIONID = "#SESSIONID#"; + private static String PEPSLIST = "#PEPSLIST#"; private static String SERVLET = CONTEXTPATH+"/GenerateIframeTemplate"; @@ -147,6 +150,15 @@ public class LoginFormBuilder { value = value.replace(CONTEXTPATH, contextpath); value = value.replace(MOASESSIONID, moaSessionID); + if (oaParam.isShowStorkLogin()) { + String pepslist = ""; + for (CPEPS current : oaParam.getPepsList()) + // check if master config has changed... + if(ConfigurationDBRead.getMOAIDConfiguration().getAuthComponentGeneral().getForeignIdentities().getSTORK().getCPEPS().contains(current)) + pepslist += "\n"; + value = value.replace(PEPSLIST, pepslist); + } + value = FormBuildUtils.customiceLayoutBKUSelection(value, oaParam.isShowMandateCheckBox(), oaParam.isOnlyMandateAllowed(), diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java index d16e85084..492770aad 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java @@ -55,6 +55,7 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA; import at.gv.egovernment.moa.id.commons.db.dao.config.BKUSelectionCustomizationType; import at.gv.egovernment.moa.id.commons.db.dao.config.BKUURLS; +import at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS; import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber; import at.gv.egovernment.moa.id.commons.db.dao.config.Mandates; import at.gv.egovernment.moa.id.commons.db.dao.config.MandatesProfileNameItem; @@ -398,9 +399,9 @@ public byte[] getSendAssertionTemplate() { return null; } - - - +public List getPepsList() { + return new ArrayList(oa_auth.getOASTORK().getCPEPS()); +} } diff --git a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html index b9d3eafa7..ef070b8eb 100644 --- a/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html +++ b/id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html @@ -815,17 +815,7 @@

Home Country Selection

i @@ -853,4 +843,4 @@ - \ No newline at end of file + -- cgit v1.2.3