aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2015-07-03 12:47:58 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2015-07-03 12:47:58 +0200
commita1ee0567607fe43909cd7fc1b75ace3197a2fa0b (patch)
tree46eb59136ead983aada956c6238cfa434e440d9e /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork
parent409e23a07616387d675e065ceac7172997fef5b7 (diff)
downloadmoa-id-spss-a1ee0567607fe43909cd7fc1b75ace3197a2fa0b.tar.gz
moa-id-spss-a1ee0567607fe43909cd7fc1b75ace3197a2fa0b.tar.bz2
moa-id-spss-a1ee0567607fe43909cd7fc1b75ace3197a2fa0b.zip
fix some configuration problems
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java30
1 files changed, 17 insertions, 13 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java
index c926e2b01..9532aa9ab 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/STORKConfig.java
@@ -38,6 +38,7 @@ import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.MiscUtil;
import at.gv.egovernment.moa.util.StringUtils;
/**
@@ -65,7 +66,7 @@ public class STORKConfig {
Map<String, String> storkCPEPSProps =
AuthConfigurationProviderFactory.getInstance().getConfigurationWithPrefix(
- MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST);
+ MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST + ".");
if (storkCPEPSProps != null) {
Set<String> keyValues = storkCPEPSProps.keySet();
for (Object elObj : keyValues) {
@@ -74,19 +75,22 @@ public class STORKConfig {
if (el.endsWith(MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_COUNTRY)) {
int index = el.indexOf(".");
String listCounter = el.substring(0, index);
- try {
- CPEPS moacpep =
- new CPEPS(storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_COUNTRY),
- new URL(storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_URL)),
- Boolean.valueOf(storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_SUPPORT_XMLDSIG)));
- cpepsMap.put(moacpep.getCountryCode(), moacpep);
+
+ if (MiscUtil.isNotEmpty(storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_COUNTRY))) {
+ try {
+ CPEPS moacpep =
+ new CPEPS(storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_COUNTRY),
+ new URL(storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_URL)),
+ Boolean.valueOf(storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_SUPPORT_XMLDSIG)));
+ cpepsMap.put(moacpep.getCountryCode(), moacpep);
- } catch (MalformedURLException e) {
- Logger.warn("CPEPS URL " +
- storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_URL) +
- " are not parseable.", e);
-
- }
+ } catch (MalformedURLException e) {
+ Logger.warn("CPEPS URL " +
+ storkCPEPSProps.get(listCounter + "." + MOAIDConfigurationConstants.GENERAL_AUTH_STORK_CPEPS_LIST_URL) +
+ " are not parseable.", e);
+
+ }
+ }
}
}
}