aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java6
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java10
2 files changed, 13 insertions, 3 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
index d4736efbb..ff8c562a7 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
@@ -304,6 +304,12 @@ public class AuthConfigurationProvider extends ConfigurationProvider {
moaidconfig = ConfigurationDBRead.getMOAIDConfiguration();
if (moaidconfig != null)
ConfigurationDBUtils.delete(moaidconfig);
+
+ List<OnlineApplication> oas = ConfigurationDBRead.getAllOnlineApplications();
+ if (oas != null && oas.size() > 0) {
+ for (OnlineApplication oa : oas)
+ ConfigurationDBUtils.delete(oa);
+ }
}
//load legacy config if it is configured
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
index 61f0f7e90..7ec8c823e 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
@@ -127,6 +127,7 @@ public class BuildFromLegacyConfig {
//Load generic Config
Map genericConfiguration = builder.buildGenericConfiguration();
GeneralConfiguration authGeneral = new GeneralConfiguration();
+
if (genericConfiguration.containsKey(GENERIC_CONFIG_PARAM_SOURCEID))
authGeneral.setAlternativeSourceID(
(String)genericConfiguration.get(GENERIC_CONFIG_PARAM_SOURCEID));
@@ -210,12 +211,14 @@ public class BuildFromLegacyConfig {
String[] transformsInfos = builder.loadTransformsInfos(transformsInfoFileNames);
List<TransformsInfoType> auth_transformInfos = new ArrayList<TransformsInfoType>();
- for (String transformInfo : transformsInfos) {
+
+ for (int i=0; i<transformsInfos.length; i++) {
+// for (String transformInfo : transformsInfos) {
TransformsInfoType transforminfotype = new TransformsInfoType();
- transforminfotype.setFilename("");
+ transforminfotype.setFilename(transformsInfoFileNames[i]);
//TODO: Transformation is stored in BASE64
- transforminfotype.setTransformation(Base64Utils.encode(transformInfo.getBytes("UTF-8")).getBytes("UTF-8"));
+ transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
auth_transformInfos.add(transforminfotype);
}
SecurityLayer auth_securityLayer = new SecurityLayer();
@@ -355,6 +358,7 @@ public class BuildFromLegacyConfig {
moa_oa.setTarget(oa.getTarget());
moa_oa.setTargetFriendlyName(oa.getTargetFriendlyName());
moa_oa.setType(oa.getOaType());
+ moa_oa.setIsActive(true);
AuthComponentOA oa_auth = new AuthComponentOA();