aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/main
diff options
context:
space:
mode:
authorAlexander Marsalek <amarsalek@iaik.tugraz.at>2020-12-09 08:53:28 +0100
committerAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-01-04 14:15:40 +0100
commitd1c4bc0619b95564f6f7db5798479449e88e4793 (patch)
treef0fb2fcdf1cbe316d0965bb4493881d4466d99a4 /eidas_modules/authmodule-eIDAS-v2/src/main
parent078fb6a05a4bff2bb7595458b4154f76fe1caea7 (diff)
downloadNational_eIDAS_Gateway-d1c4bc0619b95564f6f7db5798479449e88e4793.tar.gz
National_eIDAS_Gateway-d1c4bc0619b95564f6f7db5798479449e88e4793.tar.bz2
National_eIDAS_Gateway-d1c4bc0619b95564f6f7db5798479449e88e4793.zip
added (non working) test
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.java19
1 files changed, 8 insertions, 11 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 6f4cfefc..907ed443 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
@@ -64,7 +64,7 @@ import java.util.List;
import java.util.Map;
/**
- * Task that creates the IdentityLink for an eIDAS authenticated person.
+ * Task that searches ErnB and ZMR before adding person to SZR.
*
* @author tlenz
*/
@@ -150,16 +150,13 @@ public class InitialSearchTask extends AbstractAuthServletTask {
String personIdentifier = eidData.getPseudonym();
//search in register(step 2)
MergedRegisterSearchResult result = searchInZmrAndErnp(personIdentifier);
- switch (result.getResultCount()) {
- case 0:
- step5(result, eidData);
- break;
- case 1:
- step3(result, eidData);
- break;
- default://should not happen
- throw new TaskExecutionException(pendingReq, "Initial search - Kitt Process necessary.",
- new ManualFixNecessaryException(personIdentifier));
+ if (result.getResultCount() == 0) {
+ step5(result, eidData);
+ } else if (result.getResultCount() == 1) {
+ step3(result, eidData);
+ } else if (result.getResultCount() > 1) {
+ throw new TaskExecutionException(pendingReq, "Initial search - Kitt Process necessary.",
+ new ManualFixNecessaryException(personIdentifier));
}
}