aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2
diff options
context:
space:
mode:
authorThomas <>2022-03-02 13:10:39 +0100
committerThomas <>2022-03-02 13:10:39 +0100
commitbe411ba3e668eb86f87c0d8a021989d97b63c7a3 (patch)
treef11f69e216a025db94f62ef9d791cc7a44bd6bc0 /eidas_modules/authmodule-eIDAS-v2
parente4ccd3df84e7ea509e66f2f832719529fe408839 (diff)
downloadNational_eIDAS_Gateway-be411ba3e668eb86f87c0d8a021989d97b63c7a3.tar.gz
National_eIDAS_Gateway-be411ba3e668eb86f87c0d8a021989d97b63c7a3.tar.bz2
National_eIDAS_Gateway-be411ba3e668eb86f87c0d8a021989d97b63c7a3.zip
chore(ernp): update ERnP REST API to v1.5.1
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java25
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/resources/wsdl/ernp_client/openapi.json82
2 files changed, 89 insertions, 18 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java
index 3822da01..45a4010b 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java
@@ -62,6 +62,7 @@ import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.ErnpRestCommun
import at.asitplus.eidas.specific.modules.auth.eidas.v2.exception.WorkflowException;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.utils.VersionHolder;
import at.gv.bmi.namespace.zmr_su.base._20040201_.ServiceFault;
+import at.gv.bmi.namespace.zmr_su.zmr._20040201.EidasSuchdatenType;
import at.gv.bmi.namespace.zmr_su.zmr._20040201.PersonSuchenRequest;
import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
import at.gv.egiz.eaaf.core.exceptions.EaafAuthenticationException;
@@ -142,7 +143,7 @@ public class ErnpRestClient implements IErnpClient {
personSuchen.setSuchoptionen(generateSearchParameters());
personSuchen.setBegruendung(PROCESS_SEARCH_PERSONAL_IDENTIFIER);
final Suchdaten searchInfos = new Suchdaten();
- searchInfos.setEidas(eidasInfos);
+ searchInfos.setEidas(Arrays.asList(eidasInfos));
personSuchen.setSuchdaten(searchInfos);
// request ERnP
@@ -429,9 +430,11 @@ public class ErnpRestClient implements IErnpClient {
searchInfos.setVorname(personSearchDao.getNatuerlichePerson().getPersonenName().getVorname());
searchInfos.setGeburtsdatum(buildErnpBirthday(personSearchDao.getNatuerlichePerson().getGeburtsdatum()));
- //TODO: search eIDAS has to be a LIST!!!!!!
- SuchEidas eidasInfos = new SuchEidas();
- searchInfos.setEidas(eidasInfos);
+ // map all eIDAS documents into ERnP format
+ searchInfos.setEidas(personSearchDao.getEidasSuchdaten().stream()
+ .map(el -> buildErnpEidasDocument(el))
+ .collect(Collectors.toList()));
+
return searchInfos;
}
@@ -669,6 +672,20 @@ public class ErnpRestClient implements IErnpClient {
}
/**
+ * Map eIDAS search-data from ZMR model into ERnP model.
+ *
+ * @param daten eIDAS document as ZMR model
+ * @return the same eIDAS document as an ERnP model
+ */
+ private SuchEidas buildErnpEidasDocument(EidasSuchdatenType daten) {
+ return new SuchEidas()
+ .art(daten.getEidasArt())
+ .wert(daten.getEidasWert())
+ .staatscode2(daten.getStaatscode2());
+ }
+
+
+ /**
* Build AT specific Date String 'yyyy-MM-dd' from ERnP birthday representation.
*
* <p>
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/wsdl/ernp_client/openapi.json b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/wsdl/ernp_client/openapi.json
index fef86c1b..9e09240f 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/wsdl/ernp_client/openapi.json
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/wsdl/ernp_client/openapi.json
@@ -87,6 +87,11 @@
"schema" : {
"$ref" : "#/components/schemas/PersonAendern"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/PersonAendern"
+ }
}
}
},
@@ -98,6 +103,11 @@
"schema" : {
"$ref" : "#/components/schemas/AendernResponse"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/AendernResponse"
+ }
}
}
},
@@ -108,6 +118,11 @@
"schema" : {
"$ref" : "#/components/schemas/Fault"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Fault"
+ }
}
}
},
@@ -118,6 +133,11 @@
"schema" : {
"$ref" : "#/components/schemas/Fault"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Fault"
+ }
}
}
}
@@ -165,6 +185,11 @@
"schema" : {
"$ref" : "#/components/schemas/PersonAnlegen"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/PersonAnlegen"
+ }
}
}
},
@@ -176,6 +201,11 @@
"schema" : {
"$ref" : "#/components/schemas/AnlegenResponse"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/AnlegenResponse"
+ }
}
}
},
@@ -186,6 +216,11 @@
"schema" : {
"$ref" : "#/components/schemas/Fault"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Fault"
+ }
}
}
},
@@ -196,6 +231,11 @@
"schema" : {
"$ref" : "#/components/schemas/Fault"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Fault"
+ }
}
}
}
@@ -243,6 +283,11 @@
"schema" : {
"$ref" : "#/components/schemas/PersonSuchen"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/PersonSuchen"
+ }
}
}
},
@@ -254,6 +299,11 @@
"schema" : {
"$ref" : "#/components/schemas/SuchenResponse"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/SuchenResponse"
+ }
}
}
},
@@ -264,6 +314,11 @@
"schema" : {
"$ref" : "#/components/schemas/Fault"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Fault"
+ }
}
}
},
@@ -274,6 +329,11 @@
"schema" : {
"$ref" : "#/components/schemas/Fault"
}
+ },
+ "application/xml" : {
+ "schema" : {
+ "$ref" : "#/components/schemas/Fault"
+ }
}
}
}
@@ -716,6 +776,7 @@
}
},
"Eidas" : {
+ "required" : [ "art", "staatscode2", "wert" ],
"type" : "object",
"properties" : {
"entityId" : {
@@ -775,19 +836,6 @@
"xml" : {
"name" : "Staatscode2"
}
- },
- "image" : {
- "type" : "array",
- "xml" : {
- "name" : "Image"
- },
- "items" : {
- "type" : "string",
- "format" : "byte",
- "xml" : {
- "name" : "Image"
- }
- }
}
}
},
@@ -1836,7 +1884,13 @@
"$ref" : "#/components/schemas/SuchStaatsangehoerigkeit"
},
"eidas" : {
- "$ref" : "#/components/schemas/SuchEidas"
+ "type" : "array",
+ "xml" : {
+ "name" : "Eidas"
+ },
+ "items" : {
+ "$ref" : "#/components/schemas/SuchEidas"
+ }
}
}
},