aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/main/java
diff options
context:
space:
mode:
authorAlexander Marsalek <amarsalek@iaik.tugraz.at>2020-12-09 08:53:28 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2021-01-15 14:17:36 +0100
commitb02cb48667a1ffc95b7e104c3f287bfa1a384123 (patch)
tree3aa2d345c73d2cdcb11474999ec86dfbf96336e9 /eidas_modules/authmodule-eIDAS-v2/src/main/java
parent4b7abac5a3090b924c3c2a6c6bc0c2da8cf05bdd (diff)
downloadNational_eIDAS_Gateway-b02cb48667a1ffc95b7e104c3f287bfa1a384123.tar.gz
National_eIDAS_Gateway-b02cb48667a1ffc95b7e104c3f287bfa1a384123.tar.bz2
National_eIDAS_Gateway-b02cb48667a1ffc95b7e104c3f287bfa1a384123.zip
added (non working) test
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java')
-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 bcada70f..3b573851 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
@@ -67,7 +67,7 @@ import eu.eidas.auth.commons.protocol.eidas.impl.PostalAddress;
import lombok.extern.slf4j.Slf4j;
/**
- * Task that creates the IdentityLink for an eIDAS authenticated person.
+ * Task that searches ErnB and ZMR before adding person to SZR.
*
* @author tlenz
*/
@@ -153,16 +153,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));
}
}