aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
index dbfbda535..b5275cdd5 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
@@ -125,6 +125,10 @@ public class ConfigurationBuilder {
public static final String AUTH_FOREIGN_IDENTITIES_XPATH =
ROOT + CONF + "AuthComponent/" + CONF + "ForeignIdentities";
+ /** an XPATH-Expression */
+ public static final String AUTH_ONLINEMANDATES_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "OnlineMandates";
+
/** an XPATH-Expression */
@@ -146,6 +150,8 @@ public class ConfigurationBuilder {
/** an XPATH-Expression */
protected static final String OA_AUTH_COMPONENT_VERIFY_INFOBOXES_XPATH = CONF + "VerifyInfoboxes";
/** an XPATH-Expression */
+ protected static final String OA_AUTH_COMPONENT_MANDATES_PROFILES_XPATH = CONF + "Mandates" + "/" + CONF + "Profiles";
+ /** an XPATH-Expression */
protected static final String CONNECTION_PARAMETER_URL_XPATH =
CONF + "ConnectionParameter/@URL";
/** an XPATH-Expression */
@@ -242,6 +248,18 @@ public class ConfigurationBuilder {
return buildConnectionParameter(foreignid);
}
+
+ /**
+ * Build a ConnectionParameter containing all information
+ * of the OnlineMandates element in the authentication component
+ * @return ConnectionParameter of the authentication component OnlineMandates element
+ */
+ public ConnectionParameter buildOnlineMandatesConnectionParameter() {
+ Element onlinemandates = (Element)XPathUtils.selectSingleNode(configElem_, AUTH_ONLINEMANDATES_XPATH);
+ if (onlinemandates==null) return null;
+ return buildConnectionParameter(onlinemandates);
+
+ }
/**
* Method buildAuthBKUSelectionType.
@@ -529,7 +547,19 @@ public class ConfigurationBuilder {
}
Node verifyInfoboxParamtersNode = XPathUtils.selectSingleNode(authComponent, OA_AUTH_COMPONENT_VERIFY_INFOBOXES_XPATH);
oap.setVerifyInfoboxParameters(buildVerifyInfoboxParameters(
- verifyInfoboxParamtersNode, defaultVerifyInfoboxParameters, moaSpIdentityLinkTrustProfileID));
+ verifyInfoboxParamtersNode, defaultVerifyInfoboxParameters, moaSpIdentityLinkTrustProfileID));
+
+ Node mandateProfilesNode = XPathUtils.selectSingleNode(authComponent, OA_AUTH_COMPONENT_MANDATES_PROFILES_XPATH);
+ if (mandateProfilesNode != null) {
+ if ("businessService".equalsIgnoreCase(oaType)) {
+ Logger.error("No Online Mandate Modus for OA of type \"businessService\" allowed.");
+ throw new ConfigurationException("config.02", null);
+ }
+ else {
+ String profiles = DOMUtils.getText(mandateProfilesNode);
+ oap.setMandateProfiles(profiles);
+ }
+ }
}
OA_set.add(oap);
}