aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/main
diff options
context:
space:
mode:
authorAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-01-12 16:10:10 +0100
committerAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-01-12 16:10:10 +0100
commitc1b44dcd325e9e49ba38c384b9bfb981dca5a776 (patch)
treea985ef8dd44e6155bbd057d15ae6ee6ea5cc3b28 /eidas_modules/authmodule-eIDAS-v2/src/main
parentf74e02f9f0735ff9a1e897c5eba10f69ff720f8f (diff)
downloadNational_eIDAS_Gateway-c1b44dcd325e9e49ba38c384b9bfb981dca5a776.tar.gz
National_eIDAS_Gateway-c1b44dcd325e9e49ba38c384b9bfb981dca5a776.tar.bz2
National_eIDAS_Gateway-c1b44dcd325e9e49ba38c384b9bfb981dca5a776.zip
add task transitions
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main')
-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"