From 8175d726cecf103b3a433313f4d2ef54d09ebadf Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 9 May 2016 11:05:15 +0200 Subject: fix some problems in configuration tool --- .../id/configuration/data/GeneralMOAIDConfig.java | 2 +- .../config/ConfigurationMigrationUtils.java | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java index 95af93af3..ebd2d6283 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java @@ -281,7 +281,7 @@ public class GeneralMOAIDConfig { OAuth oauth = protocols.getOAuth(); if (oauth != null) { - protocolActiveOAuth = saml1.isIsActive(); + protocolActiveOAuth = oauth.isIsActive(); } diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java index 63d8f463c..fb2ef456c 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java @@ -22,8 +22,6 @@ moaidconfigmoaidconfigmoaidconfig * Copyright 2014 Federal Chancellery Austria */ package at.gv.egovernment.moa.id.commons.config; -import iaik.x509.X509Certificate; - import java.io.IOException; import java.math.BigInteger; import java.security.cert.CertificateException; @@ -88,6 +86,7 @@ import at.gv.egovernment.moa.id.commons.validation.TargetValidator; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Base64Utils; import at.gv.egovernment.moa.util.MiscUtil; +import iaik.x509.X509Certificate; /** * @author tlenz @@ -1259,10 +1258,16 @@ public class ConfigurationMigrationUtils { if (list.contains(MOA_CONFIG_PROTOCOL_SAML1)) result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_SAML1_LEGACY, Boolean.TRUE.toString()); + else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_SAML1_LEGACY, + Boolean.FALSE.toString()); if (list.contains(MOA_CONFIG_PROTOCOL_PVP2)) result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_PVP2X_LEGACY, Boolean.TRUE.toString()); + else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_PVP2X_LEGACY, + Boolean.FALSE.toString()); } SAML1 saml1 = protocols.getSAML1(); @@ -1277,14 +1282,18 @@ public class ConfigurationMigrationUtils { result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_SAML1_SOURCEID, saml1.getSourceID()); - } + } else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_SAML1_ENABLED, + Boolean.FALSE.toString()); OAuth oauth = protocols.getOAuth(); if (oauth != null) { result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_OPENID_ENABLED, String.valueOf(oauth.isIsActive())); - } + } else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_OPENID_ENABLED, + Boolean.FALSE.toString()); PVP2 pvp2 = protocols.getPVP2(); if (pvp2 != null) { @@ -1323,7 +1332,10 @@ public class ConfigurationMigrationUtils { result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_PVP2X_METADATA_ORG_URL, org.getURL()); } - } + + } else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_PVP2X_ENABLED, + Boolean.FALSE.toString()); } SecurityLayer seclayer = auth.getSecurityLayer(); -- cgit v1.2.3