diff options
Diffstat (limited to 'id/server')
4 files changed, 34 insertions, 18 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java index 587b641c9..3b4e5e735 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java @@ -283,6 +283,15 @@ public class StartAuthentificationParameterParser extends MOAIDAuthConstants{ String useMandate = req.getParameter(PARAM_USEMANDATE); String ccc = req.getParameter(PARAM_CCC); + if (request.getOnlineApplicationConfiguration() != null && + request.getOnlineApplicationConfiguration().isOnlyMandateAllowed()) { + Logger.debug("Service " + request.getOnlineApplicationConfiguration().getPublicURLPrefix() + + " only allows authentication with mandates. --> Set useMandate to TRUE."); + useMandate = String.valueOf(request.getOnlineApplicationConfiguration().isOnlyMandateAllowed()); + + } + + oaURL = request.getOAURL(); target = request.getTarget(); 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 963d1f50e..9386330cc 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 @@ -332,7 +332,7 @@ public String getKeyBoxIdentifier() { */ @Override public List<String> getMandateProfiles() { - String profileConfig = oaConfiguration.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_PROFILES); + String profileConfig = oaConfiguration.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_PROFILES); if (MiscUtil.isNotEmpty(profileConfig)) { List<String> list = new ArrayList<String>(); @@ -354,7 +354,7 @@ public List<String> getMandateProfiles() { @Override public boolean isShowMandateCheckBox() { try { - return Boolean.valueOf(oaConfiguration.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_USE)); + return Boolean.valueOf(oaConfiguration.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_USE)); } catch (Exception e) { Logger.warn("Enable mandates configuration parameter is not parseable.", e); @@ -368,7 +368,7 @@ public boolean isShowMandateCheckBox() { @Override public boolean isOnlyMandateAllowed() { try { - return Boolean.valueOf(oaConfiguration.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_ONLY)); + return Boolean.valueOf(oaConfiguration.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_ONLY)); } catch (Exception e) { Logger.warn("Use ONLY mandates configuration parameter is not parseable.", e); 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 ae481578a..4ff18e938 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 @@ -212,12 +212,12 @@ public class ConfigurationMigrationUtils { mandateProfiles += "," + mandates.getProfiles(); } - result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_PROFILES, mandateProfiles); + result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_PROFILES, mandateProfiles); if (mandateProfiles != null) - result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_USE, Boolean.TRUE.toString()); + result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_USE, Boolean.TRUE.toString()); else - result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_USE, Boolean.FALSE.toString()); + result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_USE, Boolean.FALSE.toString()); } //convert KeyBoxSelector @@ -611,10 +611,10 @@ public class ConfigurationMigrationUtils { if (formcustom != null) { if (formcustom.isOnlyMandateLoginAllowed() != null) { - result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_ONLY, + result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_ONLY, formcustom.isOnlyMandateLoginAllowed().toString()); } else - result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_ONLY, + result.put(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_ONLY, Boolean.FALSE.toString()); if (formcustom.getAppletHeight() != null) { @@ -797,10 +797,10 @@ public class ConfigurationMigrationUtils { dbOA.setKeyBoxIdentifier(MOAKeyBoxSelector.fromValue(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_BKU_KEYBOXIDENTIFIER))); Mandates mandates = new Mandates(); - if (Boolean.parseBoolean(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_USE))) { + if (Boolean.parseBoolean(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_USE))) { - if (oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_PROFILES) != null) { - String[] profileList = oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_PROFILES).split(","); + if (oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_PROFILES) != null) { + String[] profileList = oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_PROFILES).split(","); List<String> dbProfiles = mandates.getProfileName(); if (dbProfiles == null) { @@ -1027,8 +1027,8 @@ public class ConfigurationMigrationUtils { } - bkuselectioncustom.setMandateLoginButton(Boolean.parseBoolean(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_USE))); - bkuselectioncustom.setOnlyMandateLoginAllowed(Boolean.parseBoolean(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_ONLY))); + bkuselectioncustom.setMandateLoginButton(Boolean.parseBoolean(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_USE))); + bkuselectioncustom.setOnlyMandateLoginAllowed(Boolean.parseBoolean(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_MANDATES_OVS_ONLY))); bkuselectioncustom.setBackGroundColor(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BACKGROUNDCOLOR)); bkuselectioncustom.setFrontColor(oa.get(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_FRONTCOLOR)); diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java index fab5b437f..bd5c9e73c 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/MOAIDConfigurationConstants.java @@ -106,10 +106,14 @@ public final class MOAIDConfigurationConstants extends MOAIDConstants { public static final String SERVICE_AUTH_TESTCREDENTIALS_OIDs = SERVICE_AUTH_TESTCREDENTIALS + ".oids"; private static final String SERVICE_AUTH_MANDATES = AUTH + "." + MANDATES; - public static final String SERVICE_AUTH_MANDATES_USE = SERVICE_AUTH_MANDATES + "use"; - public static final String SERVICE_AUTH_MANDATES_ONLY = SERVICE_AUTH_MANDATES + "only"; - public static final String SERVICE_AUTH_MANDATES_PROFILES = SERVICE_AUTH_MANDATES + "profiles"; - + public static final String SERVICE_AUTH_MANDATES_OVS = SERVICE_AUTH_MANDATES + ".ovs"; + public static final String SERVICE_AUTH_MANDATES_OVS_USE = SERVICE_AUTH_MANDATES_OVS + ".use"; + public static final String SERVICE_AUTH_MANDATES_OVS_ONLY = SERVICE_AUTH_MANDATES_OVS + ".only"; + public static final String SERVICE_AUTH_MANDATES_OVS_PROFILES = SERVICE_AUTH_MANDATES_OVS + ".profiles"; + public static final String SERVICE_AUTH_MANDATES_HVB = SERVICE_AUTH_MANDATES + ".hvb"; + public static final String SERVICE_AUTH_MANDATES_HVB_USE = SERVICE_AUTH_MANDATES_HVB + ".use"; + + public static final String SERVICE_AUTH_FOREIGNBPK = AUTH + "." + FOREIGNBPK; public static final String SERVICE_AUTH_FOREIGNBPK_DECRYPT = SERVICE_AUTH_FOREIGNBPK + ".decrypt"; public static final String SERVICE_AUTH_FOREIGNBPK_DECRYPT_IV = SERVICE_AUTH_FOREIGNBPK_DECRYPT + ".iv"; @@ -170,6 +174,9 @@ public final class MOAIDConfigurationConstants extends MOAIDConstants { public static final String SERVICE_INTERFEDERATION_FORWARD_IDPIDENTIFIER = INTERFEDERATION + ".forward.IDP"; public static final String SERVICE_INTERFEDERATION_FORWARD_PROTOCOL = INTERFEDERATION + ".forward.protocol"; + public static final String SERVICE_REVERSION = "reversion"; + public static final String SERVICE_REVERSION_EVENTCODES = SERVICE_REVERSION + ".eventcodes"; + //Namespaces for general MOA-ID config @@ -204,7 +211,7 @@ public final class MOAIDConfigurationConstants extends MOAIDConstants { public static final String GENERAL_AUTH_SERVICES_OVS_URL = GENERAL_AUTH + ".services.ovs.url"; public static final String GENERAL_AUTH_SERVICES_SZRGW_URL = GENERAL_AUTH + ".services.szrgw.url"; - + public static final String GENERAL_AUTH_SERVICES_HVB_URL = GENERAL_AUTH + ".services.hvb.url"; public static final String GENERAL_AUTH_SSO_SERVICENAME = GENERAL_AUTH + "." + SSO + ".servicename"; public static final String GENERAL_AUTH_SSO_TARGET = GENERAL_AUTH + "." + SSO + ".target"; |