aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-03-27 08:27:59 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-03-27 08:27:59 +0100
commitfbef393b54c7f320502ccd5b9fade8891fe5bb33 (patch)
treed3b0d3f62666648a121e28582d3cff09b10f6c4a /id/server/idserverlib/src/main/java
parent02134974770c3f868dd3df540362f50d0083d0ff (diff)
parentfbb4e4346e7f8cd5a910f72a12272c0ea3b6ba32 (diff)
downloadmoa-id-spss-fbef393b54c7f320502ccd5b9fade8891fe5bb33.tar.gz
moa-id-spss-fbef393b54c7f320502ccd5b9fade8891fe5bb33.tar.bz2
moa-id-spss-fbef393b54c7f320502ccd5b9fade8891fe5bb33.zip
Merge branch 'moa2_0_tlenz' of gitlab.iaik.tugraz.at:afitzek/moa-idspss into moa2_0_tlenz
Diffstat (limited to 'id/server/idserverlib/src/main/java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java12
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java1
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java7
3 files changed, 16 insertions, 4 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 += "<option value=" + current.getCountryCode() + ">" + current.getCountryCode() + "</option>\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/auth/data/AuthenticationSession.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java
index 2a6bde1e8..13cebdbff 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java
@@ -50,7 +50,6 @@ import org.w3c.dom.Element;
import eu.stork.peps.auth.commons.IPersonalAttributeList;
import eu.stork.peps.auth.commons.STORKAuthnRequest;
-
import at.gv.egovernment.moa.id.auth.validator.InfoboxValidator;
import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils;
import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20SessionObject;
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<CPEPS> getPepsList() {
+ return new ArrayList<CPEPS>(oa_auth.getOASTORK().getCPEPS());
+}
}