aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java9
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml31
2 files changed, 34 insertions, 6 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
index a87be6c5..0812f55e 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java
@@ -73,6 +73,7 @@ public class InitialSearchTask extends AbstractAuthServletTask {
private IErnbClient ernbClient;
private IZmrClient zmrClient;
+ private ExecutionContext executionContext;
/*
* (non-Javadoc)
@@ -86,6 +87,7 @@ public class InitialSearchTask extends AbstractAuthServletTask {
public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response)
throws TaskExecutionException {
try {
+ this.executionContext = executionContext;
final AuthProcessDataWrapper authProcessData = pendingReq.getSessionData(AuthProcessDataWrapper.class);
final ILightResponse eidasResponse = authProcessData
.getGenericDataFromSession(Constants.DATA_FULL_EIDAS_RESPONSE, ILightResponse.class);
@@ -254,7 +256,12 @@ public class InitialSearchTask extends AbstractAuthServletTask {
ernbClient.searchWithMds(eidData.getGivenName(), eidData.getFamilyName(), eidData.getDateOfBirth());
mdsSearchResult.setResultsErnb(resultsErnb);
- log.debug("Automerge " + initialSearchResult + " with " + eidData + " " + mdsSearchResult);
+ if (mdsSearchResult.getResultCount() == 0) {
+ executionContext.put("TASK_CreateNewErnpEntryTask", true);
+ } else {
+ executionContext.put("TASK_GenerateGuiTask", true);
+ }
+
//TODO implement next phase and return correct value
return "TODO-Temporary-Endnode-105";
}
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
index 5134982a..5299093e 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
@@ -13,15 +13,15 @@
<pd:Task id="initialRegisterSearch"
class="InitialSearchTask" />
- <pd:Task id="CreateNewErnpEntryTask"
+ <pd:Task id="createNewErnpEntryTask"
class="CreateNewErnpEntryTask" />
- <pd:Task id="GenerateGuiTask"
+ <pd:Task id="generateGuiTask"
class="GenerateGuiTask" />
- <pd:Task id="GenerateMobilePhoneSignatureRequestTask"
+ <pd:Task id="generateMobilePhoneSignatureRequestTask"
class="GenerateMobilePhoneSignatureRequestTask" />
- <pd:Task id="ReceiveGuiResponseTask"
+ <pd:Task id="receiveGuiResponseTask"
class="ReceiveGuiResponseTask" />
- <pd:Task id="ReceiveMobilePhoneSignatureResponseTask"
+ <pd:Task id="receiveMobilePhoneSignatureResponseTask"
class="ReceiveMobilePhoneSignatureResponseTask" />
@@ -33,8 +33,29 @@
to="receiveAuthnResponse" />
<pd:Transition from="receiveAuthnResponse"
to="initialRegisterSearch" />
+ <!-- TODO start-->
<pd:Transition from="initialRegisterSearch"
+ to="createNewErnpEntryTask"
+ conditionExpression="ctx['TASK_CreateNewErnpEntryTask']"/>
+ <pd:Transition from="initialRegisterSearch"
+ to="generateGuiTask"
+ conditionExpression="ctx['TASK_GenerateGuiTask']"/>
+
+ <pd:Transition from="generateGuiTask"
+ to="receiveGuiResponseTask" />
+ <pd:Transition from="receiveGuiResponseTask"
+ to="generateMobilePhoneSignatureRequestTask"
+ conditionExpression="ctx['TASK_TODO']"/>
+ <pd:Transition from="generateMobilePhoneSignatureRequestTask"
+ to="receiveMobilePhoneSignatureResponseTask" />
+ <pd:Transition from="receiveMobilePhoneSignatureResponseTask"
+ to="createNewErnpEntryTask" />
+ <pd:Transition from="receiveGuiResponseTask"
+ to="createNewErnpEntryTask" />
+ <pd:Transition from="createNewErnpEntryTask"
to="generateIdentityLink" />
+ <!-- TODO end-->
+
<pd:Transition from="generateIdentityLink"
to="finalizeAuthentication" />
<pd:Transition from="finalizeAuthentication"