aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules
diff options
context:
space:
mode:
Diffstat (limited to 'eidas_modules')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/DummyErnbClient.java6
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/IErnbClient.java2
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/InitialSearchTask.java18
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/DummyZmrClient.java6
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/IZmrClient.java2
5 files changed, 32 insertions, 2 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/DummyErnbClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/DummyErnbClient.java
index 7e926c8e..0c8a2f59 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/DummyErnbClient.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/DummyErnbClient.java
@@ -1,6 +1,7 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.ernb;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -37,6 +38,11 @@ public class DummyErnbClient implements IErnbClient {
return resultEmpty();//TODO
}
+ @Override
+ public void update(RegisterResult registerResult, SimpleEidasData eidData) {
+ //TODO
+ }
+
private ArrayList<RegisterResult> resultEmpty() {
return new ArrayList<RegisterResult>();//Nobody found
}
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/IErnbClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/IErnbClient.java
index f8a41cfe..cda4c426 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/IErnbClient.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/ernb/IErnbClient.java
@@ -1,6 +1,7 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.ernb;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
import java.util.ArrayList;
@@ -15,4 +16,5 @@ public interface IErnbClient {
ArrayList<RegisterResult> searchItSpecific(String txNumber);
+ void update(RegisterResult registerResult, SimpleEidasData eidData);
}
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 2ae278dc..5b168c3b 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
@@ -95,7 +95,7 @@ public class InitialSearchTask extends AbstractAuthServletTask {
ImmutableMap<AttributeDefinition<?>, ImmutableSet<? extends AttributeValue<?>>> aa =
eidasResponse.getAttributes().getAttributeMap();
-
+
final Map<String, Object> simpleAttrMap = convertEidasAttrToSimpleMap(
eidasResponse.getAttributes().getAttributeMap());
@@ -232,8 +232,22 @@ public class InitialSearchTask extends AbstractAuthServletTask {
SimpleEidasData eidData) throws TaskExecutionException {
//TODO automerge
log.debug("Automerge " + initialSearchResult + " with " + eidData + " " + countrySpecificDetailSearchResult);
- //TODO
try {
+ if (initialSearchResult.getResultCount() != 0) {
+ throw new WorkflowException("initialSearchResult.getResultCount() != 0");
+ }
+ if (countrySpecificDetailSearchResult.getResultCount() != 1) {
+ throw new WorkflowException("countrySpecificDetailSearchResult.getResultCount() != 1");
+ }
+ if (countrySpecificDetailSearchResult.getResultsZmr().size() == 1) {
+ //update ZMR
+ zmrClient.update(countrySpecificDetailSearchResult.getResultsZmr().get(0), eidData);
+ }
+ if (countrySpecificDetailSearchResult.getResultsErnb().size() == 1) {
+ //update ErnB
+ ernbClient.update(countrySpecificDetailSearchResult.getResultsErnb().get(0), eidData);
+ }
+
String bpK = countrySpecificDetailSearchResult.getBpk();
return bpK;
} catch (WorkflowException e) {
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/DummyZmrClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/DummyZmrClient.java
index 343651f7..0f3436d8 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/DummyZmrClient.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/DummyZmrClient.java
@@ -1,6 +1,7 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.zmr;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
@@ -37,6 +38,11 @@ public class DummyZmrClient implements IZmrClient {
return resultEmpty();//TODO
}
+ @Override
+ public void update(RegisterResult registerResult, SimpleEidasData eidData) {
+ //TODO
+ }
+
private ArrayList<RegisterResult> resultEmpty() {
return new ArrayList<RegisterResult>();//Nobody found
}
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/IZmrClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/IZmrClient.java
index 018122ea..4af7bfe9 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/IZmrClient.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/zmr/IZmrClient.java
@@ -1,6 +1,7 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.zmr;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.RegisterResult;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
import java.util.ArrayList;
@@ -15,4 +16,5 @@ public interface IZmrClient {
ArrayList<RegisterResult> searchItSpecific(String txNumber);
+ void update(RegisterResult registerResult, SimpleEidasData eidData);
}