diff options
author | Thomas <> | 2022-03-10 18:04:20 +0100 |
---|---|---|
committer | Thomas <> | 2022-03-10 18:04:20 +0100 |
commit | f2df62788d1c47aea5dc16d985fd8b4fd9fa424c (patch) | |
tree | db79f4acb377499dbf7794264ec4ec7c6cf18fe2 /modules/authmodule-eIDAS-v2 | |
parent | df962dfa24bf11b67c8ffbca0e581ef36613b004 (diff) | |
download | National_eIDAS_Gateway-f2df62788d1c47aea5dc16d985fd8b4fd9fa424c.tar.gz National_eIDAS_Gateway-f2df62788d1c47aea5dc16d985fd8b4fd9fa424c.tar.bz2 National_eIDAS_Gateway-f2df62788d1c47aea5dc16d985fd8b4fd9fa424c.zip |
fix(matching): store pendingRequest before next asynch. step
Diffstat (limited to 'modules/authmodule-eIDAS-v2')
2 files changed, 11 insertions, 0 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 361f049b..62e5c57b 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 @@ -88,6 +88,9 @@ public class GenerateOtherLoginMethodGuiTask extends AbstractAuthServletTask { } + // store pending request before next step + requestStoreage.storePendingRequest(pendingReq); + guiBuilder.build(request, response, config, "Other login methods selection form"); } catch (final Exception e) { diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java index 68b73734..cc092004 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java @@ -30,6 +30,8 @@ import com.fasterxml.jackson.databind.json.JsonMapper; import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants; import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SelectedLoginMethod; import at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateOtherLoginMethodGuiTask; +import at.asitplus.eidas.specific.modules.auth.eidas.v2.test.dummy.DummyOA; +import at.gv.egiz.eaaf.core.api.IRequestStorage; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl; import at.gv.egiz.eaaf.core.impl.idp.process.ExecutionContextImpl; @@ -49,6 +51,8 @@ public class GenerateOtherLoginMethodGuiTaskTest { @Autowired GenerateOtherLoginMethodGuiTask task; + + @Autowired IRequestStorage storage; private ExecutionContextImpl executionContext = new ExecutionContextImpl(); private TestRequestImpl pendingReq; @@ -74,6 +78,7 @@ public class GenerateOtherLoginMethodGuiTaskTest { pendingReq = new TestRequestImpl(); pendingReq.setAuthUrl("https://localhost/ms_connector"); pendingReq.setPendingReqId(RandomStringUtils.randomAlphanumeric(10)); + pendingReq.setSpConfig(new DummyOA()); LocaleContextHolder.resetLocaleContext(); } @@ -103,6 +108,9 @@ public class GenerateOtherLoginMethodGuiTaskTest { assertEquals("advancedMatchingFailedReason", reason, json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED_REASON).asText()); + assertNotNull("pendingRequest not stored", + storage.getPendingRequest(pendingReq.getPendingRequestId())); + } @Test |