aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/main/java
diff options
context:
space:
mode:
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 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));
}
}