From 9c612cb3f59c190fd84db9cf0dff19309859fbf9 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 20 Jul 2015 16:46:23 +0200 Subject: change configuration key for ovs mandates --- .../moa/id/auth/parser/StartAuthentificationParameterParser.java | 9 +++++++++ .../at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'id/server/idserverlib/src/main/java') 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 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 list = new ArrayList(); @@ -354,7 +354,7 @@ public List 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); -- cgit v1.2.3