diff options
author | Thomas <> | 2022-03-11 07:09:27 +0100 |
---|---|---|
committer | Thomas <> | 2022-03-11 07:09:27 +0100 |
commit | 2119f7613a04651d7cc1cb9a8c7ecdc8556d07d9 (patch) | |
tree | 0d7ad91571b55e4eb74e7cefdcaaed7584bec599 /modules/authmodule-eIDAS-v2/src/main | |
parent | f2df62788d1c47aea5dc16d985fd8b4fd9fa424c (diff) | |
download | National_eIDAS_Gateway-2119f7613a04651d7cc1cb9a8c7ecdc8556d07d9.tar.gz National_eIDAS_Gateway-2119f7613a04651d7cc1cb9a8c7ecdc8556d07d9.tar.bz2 National_eIDAS_Gateway-2119f7613a04651d7cc1cb9a8c7ecdc8556d07d9.zip |
fix(matching): unset all matching releated parameters on executioncontext
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/main')
2 files changed, 16 insertions, 2 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java index 62e5c57b..f6ca0309 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java @@ -84,10 +84,13 @@ public class GenerateOtherLoginMethodGuiTask extends AbstractAuthServletTask { config.putCustomParameter(AbstractGuiFormBuilderConfiguration.PARAM_GROUP_UIOPTIONS, Constants.HTML_FORM_ADVANCED_MATCHING_FAILED_REASON, executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON).toString()); - } - + } } + // reset executionContext parameters + ReceiveOtherLoginMethodGuiResponseTask.ALL_EXECUTIONCONTEXT_PARAMETERS.forEach( + el -> executionContext.remove(el)); + // store pending request before next step requestStoreage.storePendingRequest(pendingReq); diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java index 075b23c1..184ad499 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveOtherLoginMethodGuiResponseTask.java @@ -24,6 +24,7 @@ package at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks; import java.util.Enumeration; +import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -31,6 +32,8 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringEscapeUtils; import org.springframework.stereotype.Component; +import com.google.common.collect.Sets; + import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants; import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SelectedLoginMethod; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; @@ -60,6 +63,14 @@ import lombok.extern.slf4j.Slf4j; @Component("ReceiveOtherLoginMethodGuiResponseTask") public class ReceiveOtherLoginMethodGuiResponseTask extends AbstractLocaleAuthServletTask { + public static final Set<String> ALL_EXECUTIONCONTEXT_PARAMETERS = Sets.newHashSet( + Constants.REQ_SELECTED_LOGIN_METHOD_PARAMETER, + Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, + Constants.TRANSITION_TO_GENERATE_EIDAS_LOGIN, + Constants.TRANSITION_TO_GENERATE_MOBILE_PHONE_SIGNATURE_REQUEST_TASK, + Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK, + Constants.TRANSITION_TO_CREATE_NEW_ERNP_ENTRY_TASK); + @Override public void executeWithLocale(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) { |