aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basicConfig/properties/messages.properties29
-rw-r--r--basicConfig/properties/messages_de.properties32
-rw-r--r--basicConfig/templates/language_selection.html12
-rw-r--r--basicConfig/templates/other_login_method.html120
-rw-r--r--basicConfig/templates/residency.html27
-rw-r--r--basicConfig/webcontent/css/css_country.css18
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java3
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java7
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java26
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java24
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java33
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java19
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml6
-rw-r--r--modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties3
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateAustrianResidenceGuiTaskTest.java53
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java67
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java14
-rw-r--r--modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java20
18 files changed, 388 insertions, 125 deletions
diff --git a/basicConfig/properties/messages.properties b/basicConfig/properties/messages.properties
index f768c00e..e1a87298 100644
--- a/basicConfig/properties/messages.properties
+++ b/basicConfig/properties/messages.properties
@@ -19,6 +19,7 @@ gui.countryselection.header2=Austrian Central eIDAS Node
gui.countryselection.header3=Operated by Federal Ministry of Internal Affairs
gui.countryselection.header.selection=Select your country
gui.countryselection.cancel=Cancel
+gui.countryselection.cancle=Cancel
gui.countryselection.notsupportedinfo=If you cannot find your country in this list then your electronic identity (eID) is not yet supported.
gui.countryselection.infos.general.header=Information on Logins with European eIDs
@@ -120,7 +121,13 @@ gui.countryselection.mode.dev=Development
##Other Login Methods page
gui.otherlogin.title=eIDAS-Login Other Login Methods
-gui.otherlogin.header.selection=Select an alternative login method
+gui.otherlogin.header.selection=Person information not found
+
+gui.otherlogin.info.first=Ihre Personendaten aus dem eben erfolgten EU-Login konnten in den Registern der österreichischen Verwaltung keinem Registereintrag eindeutig zugeordnet werden. Das kann daran liegen, dass Sie in den Registern bisher nicht eingetragen sind, oder ihre aktuellen Anmeldedaten nicht vollständig mit den in den Registern hinterlegten Daten zu Ihrer Person übereinstimmen.
+gui.otherlogin.info.second=Sie haben folgende Möglichkeiten, um eine korrekte Zuordnung zu erreichen:
+gui.otherlogin.info.list.1=Wenn Sie über eine österreichische Handy-Signatur (oder ID Austria) oder über eine alternative Möglichkeit eines EU-Logins verfügen, melden Sie sich mit diesen bitte erneut an. Verwenden Sie dazu bitte die entsprechende Schaltfläche „ID Austria“ oder „Alternative eIDAS ID“.
+gui.otherlogin.info.list.2=Verfügen Sie über keine der beiden oben genannten zusätzlichen Anmeldemöglichkeiten, setzen Sie bitte über die Schaltfläche „No alternative login methods“ fort
+
gui.otherlogin.button.hs=ID Austria
gui.otherlogin.button.eidas=Alternative eIDAS ID
gui.otherlogin.button.none=No alternative login methods
@@ -129,13 +136,12 @@ gui.otherlogin.cancel=Cancel
gui.otherlogin.inserternp.infotext=You can create a new Austrian Identity by using your identity information provided by eIDAS. During these, you get a new Austrian identifier.
-module.eidasauth.matching.20=Matching be using residence information was canceled. Use another method for matching or create a new Austrian identity.
-module.eidasauth.matching.21=Matching be using residence information failed by missing input information. Use another method for matching or create a new Austrian identity.
-module.eidasauth.matching.22=Can not find an unique match by using residence information. Provide more or other data, use another method for matching, or create a new Austrian identity.
-module.eidasauth.matching.23=Matching be using ID Austria was canceled. Use another method for matching or create a new Austrian identity.
-module.eidasauth.matching.24=Matching be using ID Austria not possible. Use another method for matching or create a new Austrian identity.
-module.eidasauth.matching.25=Matching be using alternative eIDAS authentication not possible. Provide more or other data, use another method for matching, or create a new Austrian identity.
-module.eidasauth.matching.29=Matching be using other information failed. Provide more or other data, use another method for matching, or create a new Austrian identity.
+module.eidasauth.matching.21=Matching be using residence information failed by missing input information. Add all required information.
+module.eidasauth.matching.22=Can not find an unique match by using residence information. Provide more or other data, use another method for matching.
+module.eidasauth.matching.23=Matching be using ID Austria was canceled. Use another method for matching.
+module.eidasauth.matching.24=Matching be using ID Austria not possible. Use another method for matching.
+module.eidasauth.matching.25=Matching be using alternative eIDAS authentication not possible. Provide more or other data, or use another method for matching.
+module.eidasauth.matching.29=Matching be using other information failed. Provide more or other data, or use another method for matching.
##Austrian Residency page
@@ -143,9 +149,14 @@ gui.residency.title=Austrian Residency
gui.residency.header.selection=Search for your Austrian Residency
gui.residency.header.help=You can search for the address that you have been registered at in the past. Please enter a \
postcode, municipality or village first to start the search.
+
+gui.residency.info.first=Haben Sie einen aktuellen oder ehemaligen gemeldeten Wohnsitz in Österreich, kann eine Zuordnung zu Ihrem bestehenden Registereintrag über Eingabe der Wohnsitzdaten erfolgen. Bitte benutzen Sie das untenstehende Formular, um Ihre Wohnsitzdaten einzugeben.
+gui.residency.info.second=Bitte geben Sie dazu zuerst eine Postleitzahl, Gemeinde oder Ortschaft ein und starten Sie die Suche Ihrer Wohnsitzadresse dann über die Schaltfläche „Search“. Sie werden in weiterer Folge bei der Vervollständigung der Wohnsitzadresse interaktiv unterstützt. Folgen Sie dazu den Anweisungen im Formular. Über die Schaltfläche „Clear“ können Sie den Suchvorgang jederzeit neu starten. Wurden alle Wohnsitzdaten über die Suchfunktion vollständig befüllt, setzen Sie bitte über die Schaltfläche „Proceed“ fort.
+gui.residency.info.third=Haben sie keinen aktuellen oder ehemaligen Wohnsitz in Österreich, setzen Sie bitte über die Schaltfläche „No Austrian Residency“ fort.
+
gui.residency.header.inputinvalid=Be sure to enter a value for Municipality or Village
gui.residency.cancel=Cancel
-gui.residency.back=Back to previous step
+gui.residency.back=No Austrian Residency
gui.residency.search=Search
gui.residency.clear=Clear
gui.residency.proceed=Proceed
diff --git a/basicConfig/properties/messages_de.properties b/basicConfig/properties/messages_de.properties
index 780916d0..7b47efe7 100644
--- a/basicConfig/properties/messages_de.properties
+++ b/basicConfig/properties/messages_de.properties
@@ -19,6 +19,7 @@ gui.countryselection.header2=Zentraler eIDAS Knoten der Republik Österreich
gui.countryselection.header3=Betrieben durch das Bundesministerium für Inneres
gui.countryselection.header.selection=Wählen Sie Ihr Land
gui.countryselection.cancel=Abbrechen
+gui.countryselection.cancle=Abbrechen
gui.countryselection.notsupportedinfo=Wenn Sie Ihr Land in dieser Aufzählung nicht entdecken, dann wird Ihre elektronische Identität (eID) leider noch nicht unterstützt.
gui.countryselection.infos.general.header=Information zur Anmeldung über Europäische eIDs
@@ -118,21 +119,29 @@ gui.countryselection.mode.dev=Development
##Other Login Methods page
gui.otherlogin.title=eIDAS-Login Alternative Anmeldemethoden
-gui.otherlogin.header.selection=Wählen Sie eine alternative Anmeldemethode
+gui.otherlogin.header.selection=Personendaten nicht gefunden
gui.otherlogin.button.hs=Handy-Signatur
gui.otherlogin.button.eidas=Alternativer eIDAS Login
gui.otherlogin.button.none=Keine alternative Anmeldemöglichkeit
gui.otherlogin.button.inserternp=Eine neue österreichische Identity auf Basis meiner eIDAS Daten erzeugen
gui.otherlogin.cancel=Abbrechen
-gui.otherlogin.inserternp.infotext=Falls Sie sich noch nie mit eIDAS in Österreich angemeldet haben und Sie auch noch keinen anderen Kontakt zur österreichischen Verwaltung hatten können Sie eine neue österreichischen Identifikatior erzeugen.
+gui.otherlogin.info.first=Ihre Personendaten aus dem eben erfolgten EU-Login konnten in den Registern der österreichischen Verwaltung keinem Registereintrag eindeutig zugeordnet werden. Das kann daran liegen, dass Sie in den Registern bisher nicht eingetragen sind, oder ihre aktuellen Anmeldedaten nicht vollständig mit den in den Registern hinterlegten Daten zu Ihrer Person übereinstimmen.
+gui.otherlogin.info.second=Sie haben folgende Möglichkeiten, um eine korrekte Zuordnung zu erreichen:
+gui.otherlogin.info.list.1=Wenn Sie über eine österreichische Handy-Signatur (oder ID Austria) oder über eine alternative Möglichkeit eines EU-Logins verfügen, melden Sie sich mit diesen bitte erneut an. Verwenden Sie dazu bitte die entsprechende Schaltfläche „Handy-Signatur“ oder „Alternativer EU-Login“.
+gui.otherlogin.info.list.2=Verfügen Sie über keine der beiden oben genannten zusätzlichen Anmeldemöglichkeiten, setzen Sie bitte über die Schaltfläche „Keine alternative Anmeldemöglichkeit“ fort
-module.eidasauth.matching.20=Matching auf Basis eine Wohnanschrift in Österreich wurde abgebrochen. Nutzen Sie eine andere Matchingmethode oder Erzeugen Sie einen neuen österreichischen Identifikator.
-module.eidasauth.matching.21=Das Matching auf Basis eine Wohnanschrift in Österreich schlug fehl. Nutzen Sie eine andere Matchingmethode oder Erzeugen Sie einen neuen österreichischen Identifikator.
-module.eidasauth.matching.22=Das Matching auf Basis eine Wohnanschrift in Österreich schlug fehl. Stellen Sie weitere Informationen bereit, nutzen Sie eine andere Matchingmethode oder Erzeugen Sie einen neuen österreichischen Identifikator.
-module.eidasauth.matching.23=Matching auf Basis eines ID Autria wurde abgebrochen. Nutzen Sie eine andere Matchingmethode oder Erzeugen Sie einen neuen österreichischen Identifikator.
-module.eidasauth.matching.24=Matching auf Basis eines ID Autria schlug fehl. Nutzen Sie eine andere Matchingmethode oder Erzeugen Sie einen neuen österreichischen Identifikator.
-module.eidasauth.matching.25=Matching auf Basis einer alternativen eIDAS Anmeldung schlug fehl. Stellen Sie weitere Informationen bereit, nutzen Sie eine andere Matchingmethode oder Erzeugen Sie einen neuen österreichischen Identifikator.
+gui.otherlogin.inserternp.header.selection=Neueintragung
+gui.otherlogin.inserternp.first=Ihre Personendaten konnten in den Registern der österreichischen Verwaltung keinem Eintrag eindeutig zugeordnet werden.
+gui.otherlogin.inserternp.second=Erlauben Sie die Neueintragung ihrer Personendaten in den Registern der österreichischen Verwaltung, um den Anmeldevorgang erfolgreich abzuschließen.
+gui.otherlogin.inserternp.third.prefix=Achtung: Wenn Sie der Meinung sind, in den Registern der österreichischen Verwaltung bereits einen Eintrag zu haben, wird empfohlen, an dieser Stelle keine Neueintragung Ihrer Daten zu erlauben, um doppelte Einträge zu verhindern. Kontaktieren Sie in diesem Fall bitte
+gui.otherlogin.inserternp.third.postfix=, um eine manuelle Zuordnung der Daten zu veranlassen.
+
+module.eidasauth.matching.21=Das Matching auf Basis eine Wohnanschrift in Österreich schlug fehl. Es wurden nicht alle erforderlichen Parameter für eine Suche mittels Wohnanschrift eingegeben.
+module.eidasauth.matching.22=Das Matching auf Basis eine Wohnanschrift in Österreich schlug fehl. Matching auf Basis einer bestanden oder bestehenden Wohnanschrift konnte nicht durchgeführt werden.
+module.eidasauth.matching.23=Matching auf Basis eines ID Autria wurde abgebrochen. Nutzen Sie eine andere Matchingmethode.
+module.eidasauth.matching.24=Matching auf Basis eines ID Autria schlug fehl. Nutzen Sie eine andere Matchingmethode.
+module.eidasauth.matching.25=Matching auf Basis einer alternativen eIDAS Anmeldung schlug fehl. Stellen Sie weitere Informationen bereit oder nutzen Sie eine andere Matchingmethode.
##Austrian Residency page
@@ -140,9 +149,14 @@ gui.residency.title=Österreichischer Wohnsitz
gui.residency.header.selection=Suche nach Österreichischem Wohnsitz
gui.residency.header.help=Hier können Sie nach einem Wohnsitze in Österreich suchen. Bitte geben Sie zuerst eine \
Postleitzahl, Gemeinde oder Ortschaft ein um die Suche zu starten.
+
+gui.residency.info.first=Haben Sie einen aktuellen oder ehemaligen gemeldeten Wohnsitz in Österreich, kann eine Zuordnung zu Ihrem bestehenden Registereintrag über Eingabe der Wohnsitzdaten erfolgen. Bitte benutzen Sie das untenstehende Formular, um Ihre Wohnsitzdaten einzugeben.
+gui.residency.info.second=Bitte geben Sie dazu zuerst eine Postleitzahl, Gemeinde oder Ortschaft ein und starten Sie die Suche Ihrer Wohnsitzadresse dann über die Schaltfläche „Suche“. Sie werden in weiterer Folge bei der Vervollständigung der Wohnsitzadresse interaktiv unterstützt. Folgen Sie dazu den Anweisungen im Formular. Über die Schaltfläche „Löschen“ können Sie den Suchvorgang jederzeit neu starten. Wurden alle Wohnsitzdaten über die Suchfunktion vollständig befüllt, setzen Sie bitte über die Schaltfläche „Fortfahren“ fort.
+gui.residency.info.third=Haben sie keinen aktuellen oder ehemaligen Wohnsitz in Österreich, setzen Sie bitte über die Schaltfläche „Kein Wohnsitz vorhanden“ fort.
+
gui.residency.header.inputinvalid=Bitte geben Sie einen Wert für Gemeinde oder Ortschaft ein
gui.residency.cancel=Abbrechen
-gui.residency.back=Zurück zum vorangegangenen Schritt
+gui.residency.back=Kein Wohnsitz vorhanden
gui.residency.search=Suche
gui.residency.clear=Löschen
gui.residency.proceed=Fortfahren
diff --git a/basicConfig/templates/language_selection.html b/basicConfig/templates/language_selection.html
index a268eb17..8d34c73b 100644
--- a/basicConfig/templates/language_selection.html
+++ b/basicConfig/templates/language_selection.html
@@ -3,13 +3,13 @@
xmlns:th="http://www.thymeleaf.org">
<body>
-
+
<div th:fragment="selectlanguage">
- <a th:href="@{|${submitEndpoint}?pendingid=${pendingid}|(lang='de')}" th:text="#{gui.general.language.selection.de}">Spache1</a>
+ <a th:href="@{|${submitEndpoint}?lang=de|(pendingid=${pendingid})}" th:text="#{gui.general.language.selection.de}">Spache1</a>
<span>&nbsp; &nbsp; </span>
- <a th:href="@{|${submitEndpoint}?pendingid=${pendingid}|(lang='en')}" th:text="#{gui.general.language.selection.en}">Spache2</a>
+ <a th:href="@{|${submitEndpoint}?lang=en|(pendingid=${pendingid})}" th:text="#{gui.general.language.selection.en}">Spache2</a>
</div>
-
+
</body>
-
-</html> \ No newline at end of file
+
+</html>
diff --git a/basicConfig/templates/other_login_method.html b/basicConfig/templates/other_login_method.html
index 2165add2..6806dc05 100644
--- a/basicConfig/templates/other_login_method.html
+++ b/basicConfig/templates/other_login_method.html
@@ -49,73 +49,105 @@
<h2 th:text="#{gui.countryselection.header3}"> Betrieben durch das Bundesministerium für Inneres </h2>
</div>
- <div id="matchingError"
- th:if="${advancedMatchingFailed != null} and ${advancedMatchingFailed}">
- <p th:if="${advancedMatchingFailedReason != null}"
- th:text="#{${advancedMatchingFailedReason}}">Detailed
- </p>
- <p th:unless="${advancedMatchingFailedReason != null}"
- th:text="#{module.eidasauth.matching.29}">Generell
- </p>
- </div>
+ <div th:if="${createNewErnpEntry != null} and ${createNewErnpEntry}">
+ <div class="mainDescription">
+ <h3 th:text="#{gui.otherlogin.inserternp.header.selection}"> Generate new ERnP entry</h3>
- <h3 th:text="#{gui.otherlogin.header.selection}"> Select an alternative login method </h3>
+ <p th:text="#{gui.otherlogin.inserternp.first}"> Insert ERnP first block </p>
+ <p th:text="#{gui.otherlogin.inserternp.second}"> Insert ERnP second block </p>
+ <p>
+ <span th:text="#{gui.otherlogin.inserternp.third.prefix}"> Insert ERnP third block / part 1 </span>
+ <span>bdquo;<a href="mailto:BMI-IKT-eIDAS-Betrieb@bmi.gv.at"> BMI-IKT-eIDAS-Betrieb@bmi.gv.at </a></span>
+ <span th:text="#{gui.otherlogin.inserternp.third.postfix}"> Insert ERnP third block / part 3 </span>
+ </p>
+ </div>
- <div id="otherlogin" class="block">
- <form method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
- <button type="submit" role="button" value="Handy-Signatur / Mobile Signature"
- th:text="#{gui.otherlogin.button.hs}">A
- </button>
- <input type="hidden" name="loginSelection" value="MOBILE_PHONE_SIGNATURE_LOGIN">
- <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/>
- </form>
- <form method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
- <button type="submit" role="button" value="Andere eIDAS ID"
- th:text="#{gui.otherlogin.button.eidas}">B
- </button>
- <input type="hidden" name="loginSelection" value="EIDAS_LOGIN">
- <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/>
- </form>
- <form method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
+ <div id="insertErnp" class="block">
+ <form class="block,singleButton" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
<button type="submit" role="button" value="Keine weitere HS / eIDAS"
- th:text="#{gui.otherlogin.button.none}">C
+ th:text="#{gui.otherlogin.button.inserternp}">D
</button>
- <input type="hidden" name="loginSelection" value="NO_OTHER_LOGIN">
+ <input type="hidden" name="loginSelection" value="ADD_ME_AS_NEW">
<input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/>
</form>
+ </div>
+
+ <div id="stopMatching" class="block">
+ <!-- Abbrechen Button -->
+ <form class="block,singleButton" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
+ <button type="submit" value="Abbrechen/Cancel" th:text="#{gui.otherlogin.cancel}"></button>
+ <input type="hidden" name="stopAuthProcess" value="true">
+ <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}">
+ </form>
+ </div>
- <div id="insertErnp" class="block"
- th:if="${advancedMatchingFailed != null} and ${advancedMatchingFailed}">
+ </div>
+
+ <div th:unless="${createNewErnpEntry!= null} and ${createNewErnpEntry}">
- <br>
+ <div class="mainDescription">
+ <h3 th:text="#{gui.otherlogin.header.selection}"> No person data found</h3>
- <p th:text="#{gui.otherlogin.inserternp.infotext}"></p>
+ <p th:text="#{gui.otherlogin.info.first}"> Info text after MDS search with one or more results</p>
+ <p th:text="#{gui.otherlogin.info.second}"> Prefix for option list</p>
+ <ul>
+ <li th:text="#{gui.otherlogin.info.list.1}"> ID Austria or alterantive eIDAS Login </li>
+ <li th:text="#{gui.otherlogin.info.list.2}"> Search with Address </li>
+ </ul>
+ </div>
- <br>
+ <div id="matchingError"
+ th:if="${advancedMatchingFailed != null} and ${advancedMatchingFailed}">
+ <p th:if="${advancedMatchingFailedReason != null}"
+ th:text="#{${advancedMatchingFailedReason}}">Detailed
+ </p>
+ <p th:unless="${advancedMatchingFailedReason != null}"
+ th:text="#{module.eidasauth.matching.29}">Generell
+ </p>
+ </div>
- <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
- <button type="submit" role="button" value="Keine weitere HS / eIDAS"
- th:text="#{gui.otherlogin.button.inserternp}">D
- </button>
- <input type="hidden" name="loginSelection" value="ADD_ME_AS_NEW">
- <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/>
- </form>
+
+ <div id="otherlogin" class="block">
+ <div id="selectOtherMethodArea" class="block">
+ <form method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
+ <button class="primaryButton" type="submit" role="button" value="Handy-Signatur / Mobile Signature"
+ th:text="#{gui.otherlogin.button.hs}">A
+ </button>
+ <input type="hidden" name="loginSelection" value="MOBILE_PHONE_SIGNATURE_LOGIN">
+ <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/>
+ </form>
+ <form method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
+ <button class="primaryButton" type="submit" role="button" value="Andere eIDAS ID"
+ th:text="#{gui.otherlogin.button.eidas}">B
+ </button>
+ <input type="hidden" name="loginSelection" value="EIDAS_LOGIN">
+ <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/>
+ </form>
+ <form method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
+ <button class="primaryButton" type="submit" role="button" value="Keine weitere HS / eIDAS"
+ th:text="#{gui.otherlogin.button.none}">C
+ </button>
+ <input type="hidden" name="loginSelection" value="NO_OTHER_LOGIN">
+ <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/>
+ </form>
</div>
<div id="stopMatching" class="block">
<!-- Abbrechen Button -->
- <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
+ <form class="block,singleButton" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
<button type="submit" value="Abbrechen/Cancel" th:text="#{gui.otherlogin.cancel}"></button>
<input type="hidden" name="stopAuthProcess" value="true">
<input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}">
</form>
</div>
+ </div>
+
</div>
-</div>
-<footer>
+ </div>
+ <footer>
<div class="copyright">&copy; BUNDESMINISTERIUM FÜR INNERES</div>
<div></div>
-</footer>
+ </footer>
</body>
</html>
diff --git a/basicConfig/templates/residency.html b/basicConfig/templates/residency.html
index f8516945..26812ec0 100644
--- a/basicConfig/templates/residency.html
+++ b/basicConfig/templates/residency.html
@@ -173,7 +173,22 @@
<h2 th:text="#{gui.countryselection.header3}"> Betrieben durch das Bundesministerium für Inneres </h2>
</div>
- <h1 th:text="#{gui.residency.header.selection}">Search your Austrian Residency</h1>
+ <div class="mainDescription">
+ <h3 th:text="#{gui.residency.header.selection}">Search your Austrian Residency </h3>
+
+ <p th:text="#{gui.residency.info.first}"> Info text for matching by address </p>
+ <p th:text="#{gui.residency.info.second}"> HowTo search by address </p>
+ </div>
+
+ <div id="matchingError"
+ th:if="${advancedMatchingFailed != null} and ${advancedMatchingFailed}">
+ <p th:if="${advancedMatchingFailedReason != null}"
+ th:text="#{${advancedMatchingFailedReason}}">Detailed
+ </p>
+ <p th:unless="${advancedMatchingFailedReason != null}"
+ th:text="#{module.eidasauth.matching.29}">Generell
+ </p>
+ </div>
<div id="residency">
<form id="inputForm" method="post" action="$contextPath$submitEndpoint"
@@ -217,18 +232,22 @@
</form>
</div>
+
<div id="backOrReturn" class="block">
- <form method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
+
+ <p th:text="#{gui.residency.info.third}"> Alternativ infos and back </p>
+ <br>
+ <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
<button type="submit" value="Back" th:text="#{gui.residency.back}">Back</button>
<input type="hidden" name="noResidence" value="true">
<input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}">
</form>
- <form method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
+ <!--form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}">
<button type="submit" value="Abbrechen/Cancel" th:text="#{gui.residency.cancel}">Cancel</button>
<input type="hidden" name="stopAuthProcess" value="true">
<input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}">
- </form>
+ </form-->
</div>
diff --git a/basicConfig/webcontent/css/css_country.css b/basicConfig/webcontent/css/css_country.css
index 34b0e928..e193126c 100644
--- a/basicConfig/webcontent/css/css_country.css
+++ b/basicConfig/webcontent/css/css_country.css
@@ -69,6 +69,24 @@ input[type=button], input[type=submit], input[type=reset] {
border: none;
}
+.primaryButton {
+ height: 4em;
+}
+
+.singleButton {
+ padding-left: 2em;
+}
+
+.mainDescription {
+ width: 80%;
+}
+
+
+div.mainDescription li {
+ display: list-item;
+
+}
+
div.header {
background-color: #e9ecef;
padding-top: 28px;
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java
index 5cc15814..57a4c19a 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java
@@ -57,8 +57,7 @@ public class GenerateCountrySelectionFrameTask extends AbstractLocaleAuthServlet
@Override
public void executeWithLocale(ExecutionContext executionContext, HttpServletRequest request,
- HttpServletResponse response)
- throws TaskExecutionException {
+ HttpServletResponse response) throws TaskExecutionException {
try {
revisionsLogger.logEvent(pendingReq, MsConnectorEventCodes.STARTING_COUNTRY_SELECTION);
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
index fbc211f5..0b5d086d 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/Constants.java
@@ -320,6 +320,7 @@ public class Constants {
// UI options
+ public static final String HTML_FORM_CREATE_NEW_ERNP_ENTRY = "createNewErnpEntry";
public static final String HTML_FORM_ADVANCED_MATCHING_FAILED = "advancedMatchingFailed";
public static final String HTML_FORM_ADVANCED_MATCHING_FAILED_REASON =
HTML_FORM_ADVANCED_MATCHING_FAILED + "Reason";
@@ -348,6 +349,12 @@ public class Constants {
"TASK_GenerateAustrianResidenceGuiTask";
/**
+ * {@link at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.CreateNewErnpEntryTask}.
+ */
+ public static final String TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK = "TASK_RequestingNewErnpEntryTask";
+
+
+ /**
* {@link at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateMobilePhoneSignatureRequestTask}.
*/
public static final String TRANSITION_TO_GENERATE_MOBILE_PHONE_SIGNATURE_REQUEST_TASK =
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java
index 190e28eb..dc57dd78 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateAustrianResidenceGuiTask.java
@@ -31,10 +31,13 @@ import org.springframework.stereotype.Component;
import at.asitplus.eidas.specific.core.MsEidasNodeConstants;
import at.asitplus.eidas.specific.core.gui.StaticGuiBuilderConfiguration;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.utils.MatchingTaskUtils;
import at.gv.egiz.eaaf.core.api.gui.ISpringMvcGuiFormBuilder;
import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
+import at.gv.egiz.eaaf.core.impl.gui.AbstractGuiFormBuilderConfiguration;
import at.gv.egiz.eaaf.core.impl.idp.controller.tasks.AbstractLocaleAuthServletTask;
import lombok.extern.slf4j.Slf4j;
@@ -55,8 +58,8 @@ public class GenerateAustrianResidenceGuiTask extends AbstractLocaleAuthServletT
private IConfiguration basicConfig;
@Override
- public void executeWithLocale(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response)
- throws TaskExecutionException {
+ public void executeWithLocale(ExecutionContext executionContext,
+ HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException {
try {
final StaticGuiBuilderConfiguration config = new StaticGuiBuilderConfiguration(
basicConfig,
@@ -72,6 +75,25 @@ public class GenerateAustrianResidenceGuiTask extends AbstractLocaleAuthServletT
PARAM_FORMWIZARDPOINT,
pendingReq.getAuthUrl() + MsEidasNodeConstants.ENDPOINT_RESIDENCY_SEARCH);
+
+ // inject flag to indicate advanced matching error
+ if (MatchingTaskUtils.getExecutionContextFlag(
+ executionContext, Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED)) {
+ config.putCustomParameter(AbstractGuiFormBuilderConfiguration.PARAM_GROUP_UIOPTIONS,
+ Constants.HTML_FORM_ADVANCED_MATCHING_FAILED, String.valueOf(true));
+
+ //set detailed error-code
+ if (executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON) != null) {
+ config.putCustomParameter(AbstractGuiFormBuilderConfiguration.PARAM_GROUP_UIOPTIONS,
+ Constants.HTML_FORM_ADVANCED_MATCHING_FAILED_REASON,
+ executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON).toString());
+ }
+ }
+
+ // reset executionContext parameters
+ ReceiveOtherLoginMethodGuiResponseTask.ALL_EXECUTIONCONTEXT_PARAMETERS.forEach(
+ el -> executionContext.remove(el));
+
guiBuilder.build(request, response, config, "Query Austrian residency");
} catch (final Exception e) {
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java
index 11da4281..a90c5929 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateOtherLoginMethodGuiTask.java
@@ -23,8 +23,6 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks;
-import java.io.Serializable;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -34,6 +32,7 @@ import org.springframework.stereotype.Component;
import at.asitplus.eidas.specific.core.MsEidasNodeConstants;
import at.asitplus.eidas.specific.core.gui.StaticGuiBuilderConfiguration;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.utils.MatchingTaskUtils;
import at.gv.egiz.eaaf.core.api.gui.ISpringMvcGuiFormBuilder;
import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
@@ -62,8 +61,8 @@ public class GenerateOtherLoginMethodGuiTask extends AbstractLocaleAuthServletTa
private IConfiguration basicConfig;
@Override
- public void executeWithLocale(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response)
- throws TaskExecutionException {
+ public void executeWithLocale(ExecutionContext executionContext,
+ HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException {
try {
final StaticGuiBuilderConfiguration config = new StaticGuiBuilderConfiguration(
basicConfig,
@@ -75,7 +74,8 @@ public class GenerateOtherLoginMethodGuiTask extends AbstractLocaleAuthServletTa
resourceLoader);
// inject flag to indicate advanced matching error
- if (getExecutionContextFlag(executionContext, Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED)) {
+ if (MatchingTaskUtils.getExecutionContextFlag(
+ executionContext, Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED)) {
config.putCustomParameter(AbstractGuiFormBuilderConfiguration.PARAM_GROUP_UIOPTIONS,
Constants.HTML_FORM_ADVANCED_MATCHING_FAILED, String.valueOf(true));
@@ -87,6 +87,13 @@ public class GenerateOtherLoginMethodGuiTask extends AbstractLocaleAuthServletTa
}
}
+ // inject request to create a new ERnP entry
+ config.putCustomParameter(AbstractGuiFormBuilderConfiguration.PARAM_GROUP_UIOPTIONS,
+ Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY,
+ String.valueOf(
+ MatchingTaskUtils.getExecutionContextFlag(
+ executionContext,Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK)));
+
// reset executionContext parameters
ReceiveOtherLoginMethodGuiResponseTask.ALL_EXECUTIONCONTEXT_PARAMETERS.forEach(
el -> executionContext.remove(el));
@@ -102,11 +109,4 @@ public class GenerateOtherLoginMethodGuiTask extends AbstractLocaleAuthServletTa
}
}
- private boolean getExecutionContextFlag(ExecutionContext executionContext, String key) {
- Serializable value = executionContext.get(key);
- return value instanceof Boolean && (boolean)value
- || value instanceof String && Boolean.parseBoolean((String) value);
-
- }
-
}
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
index 89a3f350..f335bc2a 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveAustrianResidenceGuiResponseTask.java
@@ -25,9 +25,11 @@ package at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks;
import static at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED;
import static at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON;
-import static at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK;
+import static at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK;
+import static at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK;
import java.util.Enumeration;
+import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -37,6 +39,8 @@ import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;
+import com.google.common.collect.Sets;
+
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.controller.AdresssucheController;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.controller.AdresssucheController.AdresssucheOutput;
@@ -83,13 +87,19 @@ import lombok.extern.slf4j.Slf4j;
@Component("ReceiveAustrianResidenceGuiResponseTask")
public class ReceiveAustrianResidenceGuiResponseTask extends AbstractLocaleAuthServletTask {
- private static final String MSG_PROP_20 = "module.eidasauth.matching.20";
private static final String MSG_PROP_21 = "module.eidasauth.matching.21";
private static final String MSG_PROP_22 = "module.eidasauth.matching.22";
public static final String HTTP_PARAM_NO_RESIDENCE = "noResidence";
+ public static final Set<String> ALL_EXECUTIONCONTEXT_PARAMETERS = Sets.newHashSet(
+ CONTEXT_FLAG_ADVANCED_MATCHING_FAILED,
+ CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON,
+ TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK,
+ TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK);
+
private final RegisterSearchService registerSearchService;
+
public ReceiveAustrianResidenceGuiResponseTask(RegisterSearchService registerSearchService) {
this.registerSearchService = registerSearchService;
@@ -104,21 +114,22 @@ public class ReceiveAustrianResidenceGuiResponseTask extends AbstractLocaleAuthS
//return to AuswahlScreen if HTTP_PARAM_NO_RESIDENCE was selected
final boolean forwardWithOutMandate = parseFlagFromHttpRequest(request, HTTP_PARAM_NO_RESIDENCE, false);
if (forwardWithOutMandate) {
- log.debug("User selects 'no residence' button. Switch back to 'other matching' selection ... ");
- executionContext.put(TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, true);
-
- executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON, MSG_PROP_20);
- executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
+ log.debug("User selects 'no residence' button. Switch back to 'insert-into-ERnP' selection ... ");
+ executionContext.put(TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK, true);
+ executionContext.put(TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK, false);
return;
+ } else {
+ executionContext.put(TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK, false);
+
}
//load search parameters from HTML form
AdresssucheOutput input = parseHtmlInput(request);
if (validateHtmlInput(input)) {
// HTML form should ensure that mandatory fields are set => this should never happen
- log.warn("HTML form contains no residence information. Switch back to 'other matching' selection ... ");
- executionContext.put(TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, true);
+ log.warn("HTML form contains no residence information. Switch back to 'input residence inputs' ... ");
+ executionContext.put(TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK, true);
executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON, MSG_PROP_21);
executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
@@ -136,9 +147,9 @@ public class ReceiveAustrianResidenceGuiResponseTask extends AbstractLocaleAuthS
// validate matching response from registers
if (residencyResult.getResultCount() != 1) {
- log.info("Find {} match by using residence information. Forward user to 'other matching' selection ... ",
+ log.info("Find {} match by using residence information. Forward user to 'input residence infos' ... ",
residencyResult.getResultCount() == 0 ? "no" : "more-than-one");
- executionContext.put(TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK, true);
+ executionContext.put(TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK, true);
executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON, MSG_PROP_22);
executionContext.put(CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
index ad641841..3c9db9ea 100644
--- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
+++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/utils/MatchingTaskUtils.java
@@ -1,5 +1,6 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.utils;
+import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -20,6 +21,7 @@ import at.asitplus.eidas.specific.modules.auth.eidas.v2.dao.SimpleEidasData;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.service.ICcSpecificEidProcessingService;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.service.RegisterSearchService.RegisterStatusResults;
import at.gv.egiz.eaaf.core.api.IRequest;
+import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.exceptions.EaafStorageException;
import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper;
import eu.eidas.auth.commons.attribute.AttributeDefinition;
@@ -67,7 +69,7 @@ public class MatchingTaskUtils {
RegisterStatusResults.class);
}
-
+
/**
* Store intermediate matching result into session.
*
@@ -123,6 +125,21 @@ public class MatchingTaskUtils {
}
+
+ /**
+ * Evaluate a flag on Execution context.
+ *
+ * @param executionContext Current execution context.
+ * @param key Parameter name
+ * @return <code>true</code> if the parameter exists and evaluates to <code>true</code>, otherwise <code>false</code>
+ */
+ public static boolean getExecutionContextFlag(ExecutionContext executionContext, String key) {
+ Serializable value = executionContext.get(key);
+ return value instanceof Boolean && (boolean)value
+ || value instanceof String && Boolean.parseBoolean((String) value);
+
+ }
+
/**
* Convert attributes from eIDAS Authn Response into a simple map, to be used from
* {@link ICcSpecificEidProcessingService#postProcess(Map)}.
diff --git a/modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml b/modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
index d72d6ac7..dfa8622c 100644
--- a/modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
+++ b/modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml
@@ -67,9 +67,9 @@
<!-- address searching -->
<pd:Transition from="generateAustrianResidenceGuiTask" to="receiveAustrianResidenceGuiResponseTask" />
- <pd:Transition conditionExpression="ctx['changeLanguage']"
- from="receiveAustrianResidenceGuiResponseTask" to="generateAustrianResidenceGuiTask" />
- <pd:Transition conditionExpression="ctx['TASK_GenerateOtherLoginMethodGuiTask']"
+ <pd:Transition conditionExpression="ctx['changeLanguage'] or ctx['TASK_GenerateAustrianResidenceGuiTask']"
+ from="receiveAustrianResidenceGuiResponseTask" to="generateAustrianResidenceGuiTask" />
+ <pd:Transition conditionExpression="ctx['TASK_RequestingNewErnpEntryTask']"
from="receiveAustrianResidenceGuiResponseTask" to="generateOtherLoginMethodGuiTask" />
<pd:Transition from="receiveAustrianResidenceGuiResponseTask" to="generateIdentityLink" />
diff --git a/modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties b/modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties
index 3942f30a..bd05fef2 100644
--- a/modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties
+++ b/modules/authmodule-eIDAS-v2/src/main/resources/messages/eidas_connector_message.properties
@@ -22,8 +22,7 @@ module.eidasauth.matching.04=An error occurred while loading your data from offi
module.eidasauth.matching.11=Matching failed, because of an ERnP communication error. Reason: {0}
module.eidasauth.matching.12=Matching failed, because ERnP response contains historic information which is not supported.
-
-module.eidasauth.matching.20=Matching be using residence information was canceled. Use another method for matching or create a new Austrian identity.
+
module.eidasauth.matching.21=Matching be using residence information failed by missing input information. Use another method for matching or create a new Austrian identity.
module.eidasauth.matching.22=Can not find an unique match by using residence information. Provide more or other data, use another method for matching, or create a new Austrian identity.
module.eidasauth.matching.23=Matching be using Austrian Identity was canceled. Use another method for matching or create a new Austrian identity.
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateAustrianResidenceGuiTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateAustrianResidenceGuiTaskTest.java
index 539a41d2..1fc96e10 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateAustrianResidenceGuiTaskTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateAustrianResidenceGuiTaskTest.java
@@ -26,6 +26,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.json.JsonMapper;
+import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateAustrianResidenceGuiTask;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl;
@@ -95,6 +96,35 @@ public class GenerateAustrianResidenceGuiTaskTest {
@Test
@SneakyThrows
+ public void jsonResponseWithError() throws TaskExecutionException, UnsupportedEncodingException {
+ httpReq.addHeader("Accept", "application/json");
+
+ String reason = RandomStringUtils.randomAlphabetic(5);
+ executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
+ executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON, reason);
+
+ task.execute(pendingReq, executionContext);
+
+ //result validation
+ Assert.assertEquals("httpStausCode", 200, httpResp.getStatus());
+ Assert.assertEquals("http ContentType", "application/json;charset=UTF-8", httpResp.getContentType());
+ final String content = httpResp.getContentAsString();
+ assertNotNull("response body is null", content);
+ Assert.assertFalse("response body is empty", content.isEmpty());
+ final JsonNode json = new JsonMapper().readTree(content);
+ assertNotNull("response body is null", json);
+ checkJsonElement(json, "wizardEndpoint", "https://localhost/ms_connector/residency/search");
+
+ assertNotNull("advancedMatchFailed", json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED));
+ assertTrue("advancedMatchFailed", json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED).asBoolean());
+ assertNotNull("advancedMatchingFailedReason", json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED_REASON));
+ assertEquals("advancedMatchingFailedReason", reason,
+ json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED_REASON).asText());
+
+ }
+
+ @Test
+ @SneakyThrows
public void htmlResponse() throws TaskExecutionException, UnsupportedEncodingException {
task.execute(pendingReq, executionContext);
@@ -109,6 +139,29 @@ public class GenerateAustrianResidenceGuiTaskTest {
}
+ @Test
+ @SneakyThrows
+ public void htmlResponseWithError() throws TaskExecutionException, UnsupportedEncodingException {
+
+ String reason = RandomStringUtils.randomAlphabetic(5);
+ executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
+ executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON, reason);
+
+ task.execute(pendingReq, executionContext);
+
+ //result validation
+ Assert.assertEquals("httpStausCode", 200, httpResp.getStatus());
+ Assert.assertEquals("http ContentType", "text/html;charset=UTF-8", httpResp.getContentType());
+ final String content = httpResp.getContentAsString();
+ assertNotNull("response body is null", content);
+ Assert.assertFalse("response body is empty", content.isEmpty());
+ assertTrue("no wizard endpoint", content.contains("https://localhost/ms_connector/residency/search"));
+
+ Assert.assertTrue("missing errorfield", content.contains("<div id=\"matchingError\""));
+ Assert.assertTrue("missing errorfield", content.contains(reason));
+
+ }
+
private void checkJsonElement(JsonNode json, String key, String expected) {
assertTrue("no element: " + key, json.has(key));
assertEquals("wrong element:" + key, expected, json.get(key).asText());
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java
index 1751e95a..496158fa 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/GenerateOtherLoginMethodGuiTaskTest.java
@@ -1,6 +1,7 @@
package at.asitplus.eidas.specific.modules.auth.eidas.v2.test.tasks;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -106,17 +107,47 @@ public class GenerateOtherLoginMethodGuiTaskTest {
ReceiveOtherLoginMethodGuiResponseTask.ALL_EXECUTIONCONTEXT_PARAMETERS.forEach(
el -> assertNull("executionContext parameter: " + el, executionContext.get(el)));
- // remove pendingRequestId because it's added by default
- executionContext.remove(EaafConstants.PROCESS_ENGINE_PENDINGREQUESTID);
-
+ // remove pendingRequestId and changeLanguage because it's added by default
+ executionContext.remove(EaafConstants.PROCESS_ENGINE_PENDINGREQUESTID);
+ executionContext.remove("changeLanguage");
+
// in case of 'ReceiveOtherLoginMethodGuiResponseTask.ALL_EXECUTIONCONTEXT_PARAMETERS' does not include all parameters
assertTrue("ExecutionContext is not empty", executionContext.keySet().isEmpty());
}
+
+ @Test
+ @SneakyThrows
+ public void jsonResponseInsertErnp() throws TaskExecutionException, UnsupportedEncodingException {
+ String reason = RandomStringUtils.randomAlphabetic(5);
+ executionContext.put(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK, true);
+ httpReq.addHeader("Accept", "application/json");
+
+ task.execute(pendingReq, executionContext);
+
+ //result validation
+ Assert.assertEquals("httpStausCode", 200, httpResp.getStatus());
+ Assert.assertEquals("http ContentType", "application/json;charset=UTF-8", httpResp.getContentType());
+ final String content = httpResp.getContentAsString();
+ assertNotNull("response body is null", content);
+ Assert.assertFalse("response body is empty", content.isEmpty());
+ final JsonNode json = new JsonMapper().readTree(content);
+ assertNotNull("response body is null", json);
+ assertNull("advancedMatchFailed", json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED));
+ assertNotNull("createNewErnpEntry", json.get(Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY));
+ assertTrue("createNewErnpEntry", json.get(Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY).asBoolean());
+
+ assertNull("advancedMatchingFailedReason", json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED_REASON));
+
+ assertNotNull("pendingRequest not stored",
+ storage.getPendingRequest(pendingReq.getPendingRequestId()));
+
+ }
+
@Test
@SneakyThrows
- public void jsonResponse() throws TaskExecutionException, UnsupportedEncodingException {
+ public void jsonResponseMathingFailed() throws TaskExecutionException, UnsupportedEncodingException {
String reason = RandomStringUtils.randomAlphabetic(5);
executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON, reason);
@@ -138,19 +169,41 @@ public class GenerateOtherLoginMethodGuiTaskTest {
assertEquals("advancedMatchingFailedReason", reason,
json.get(Constants.HTML_FORM_ADVANCED_MATCHING_FAILED_REASON).asText());
+ assertNotNull("createNewErnpEntry", json.get(Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY));
+ assertFalse("createNewErnpEntry", json.get(Constants.HTML_FORM_CREATE_NEW_ERNP_ENTRY).asBoolean());
+
assertNotNull("pendingRequest not stored",
storage.getPendingRequest(pendingReq.getPendingRequestId()));
}
@Test
+ public void insertErnpRequested() throws TaskExecutionException, UnsupportedEncodingException {
+ executionContext.put(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK, true);
+
+ task.execute(pendingReq, executionContext);
+
+ Assert.assertEquals("Wrong http StatusCode", 200, httpResp.getStatus());
+ Assert.assertEquals("Wrong http ContentType", "text/html;charset=UTF-8", httpResp.getContentType());
+
+ String html = httpResp.getContentAsString();
+ Assert.assertNotNull("html result is null", html);
+ Assert.assertFalse("html result is empty", html.isEmpty());
+ Assert.assertTrue("No language selector with pendingRequestId",
+ html.contains("/otherLoginMethod?lang=en&amp;pendingid=" + pendingReq.getPendingRequestId()));
+ Assert.assertTrue("Missing eIDAS infos",
+ html.contains(MessageFormat.format(TEST_PATTER_REQ_PARAM, SelectedLoginMethod.ADD_ME_AS_NEW)));
+
+ }
+
+ @Test
public void advancedMatchingFailedMsg() throws TaskExecutionException, UnsupportedEncodingException {
executionContext.put(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED, true);
task.execute(pendingReq, executionContext);
String html = doBasicValidation();
- Assert.assertTrue("Missing eIDAS infos",
+ Assert.assertFalse("Missing eIDAS infos",
html.contains(MessageFormat.format(TEST_PATTER_REQ_PARAM, SelectedLoginMethod.ADD_ME_AS_NEW)));
Assert.assertTrue("missing errorfield",
html.contains("<div id=\"matchingError\""));
@@ -166,8 +219,6 @@ public class GenerateOtherLoginMethodGuiTaskTest {
task.execute(pendingReq, executionContext);
String html = doBasicValidation();
- Assert.assertTrue("Missing eIDAS infos",
- html.contains(MessageFormat.format(TEST_PATTER_REQ_PARAM, SelectedLoginMethod.ADD_ME_AS_NEW)));
Assert.assertTrue("missing errorfield",
html.contains("<div id=\"matchingError\""));
Assert.assertTrue("missing errorfield",
@@ -232,7 +283,7 @@ public class GenerateOtherLoginMethodGuiTaskTest {
html.contains(MessageFormat.format(TEST_PATTER_REQ_PARAM, SelectedLoginMethod.EIDAS_LOGIN)));
Assert.assertTrue("No language selector with pendingRequestId",
- html.contains("/otherLoginMethod?pendingid=" + pendingReq.getPendingRequestId()));
+ html.contains("/otherLoginMethod?lang=en&amp;pendingid=" + pendingReq.getPendingRequestId()));
Assert.assertTrue("No country-selection form",
html.contains("<form method=\"post\" action=\"/otherLoginMethod\">"));
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java
index 649fa48c..8d52baf3 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java
@@ -127,17 +127,17 @@ public class ReceiveAustrianResidenceGuiResponseTaskRegisterTest {
@Test
public void canceledByUser() throws Exception {
- AdresssucheOutput userInput = setupUserInput();
- SimpleEidasData eidasData = setupEidasData();
RegisterStatusResults registerSearchResult = buildEmptyResult();
MatchingTaskUtils.storeIntermediateMatchingResult(pendingReq, registerSearchResult);
httpReq.setParameter(ReceiveAustrianResidenceGuiResponseTask.HTTP_PARAM_NO_RESIDENCE, "true");
task.execute(pendingReq, executionContext);
- assertEquals("Transition To S9", true, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
- assertEquals("matching failed flag", true, executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
- assertEquals("failed reason", "module.eidasauth.matching.20", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON));
+ assertEquals("Transition To RequestInserErnp", true,
+ executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK));
+ assertEquals("Transition To AddressSearchForm", false,
+ executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK));
+ assertNull("matching failed flag", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
assertNull("no final matching result", MatchingTaskUtils.getFinalMatchingResult(pendingReq));
}
@@ -157,7 +157,9 @@ public class ReceiveAustrianResidenceGuiResponseTaskRegisterTest {
task.execute(pendingReq, executionContext);
// validate state
- assertEquals("Transition To S9", true, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
+ assertEquals("Transition To RequestInserErnp", false, executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK));
+ assertEquals("Transition To AddressSearchForm", true,
+ executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK));
assertEquals("matching failed flag", true, executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
assertEquals("failed reason", "module.eidasauth.matching.22", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON));
assertNull("no final matching result", MatchingTaskUtils.getFinalMatchingResult(pendingReq));
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java
index ece0f16d..d7c0acc4 100644
--- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java
+++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java
@@ -100,9 +100,11 @@ public class ReceiveAustrianResidenceGuiResponseTaskTest {
task.execute(pendingReq, executionContext);
- assertEquals("Transition To S9", true, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
- assertEquals("matching failed flag", true, executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
- assertEquals("failed reason", "module.eidasauth.matching.20", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON));
+ assertEquals("Transition To RequestInserErnp", true,
+ executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK));
+ assertEquals("Transition To AddressSearchForm", false,
+ executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK));
+ assertNull("matching failed flag", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
assertNull("no final matching result", MatchingTaskUtils.getFinalMatchingResult(pendingReq));
}
@@ -114,7 +116,9 @@ public class ReceiveAustrianResidenceGuiResponseTaskTest {
task.execute(pendingReq, executionContext);
- assertEquals("Transition To S9", true, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
+ assertEquals("Transition To RequestInserErnp", false, executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK));
+ assertEquals("Transition To AddressSearchForm", true,
+ executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK));
assertEquals("matching failed flag", true, executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
assertEquals("failed reason", "module.eidasauth.matching.21", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON));
assertNull("no final matching result", MatchingTaskUtils.getFinalMatchingResult(pendingReq));
@@ -131,7 +135,9 @@ public class ReceiveAustrianResidenceGuiResponseTaskTest {
task.execute(pendingReq, executionContext);
- assertEquals("Transition To S9", true, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
+ assertEquals("Transition To RequestInserErnp", false, executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK));
+ assertEquals("Transition To AddressSearchForm", true,
+ executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK));
assertEquals("matching failed flag", true, executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
assertEquals("failed reason", "module.eidasauth.matching.22", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON));
assertNull("no final matching result", MatchingTaskUtils.getFinalMatchingResult(pendingReq));
@@ -189,7 +195,9 @@ public class ReceiveAustrianResidenceGuiResponseTaskTest {
task.execute(pendingReq, executionContext);
- assertEquals("Transition To S9", true, executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK));
+ assertEquals("Transition To RequestInserErnp", false, executionContext.get(Constants.TRANSITION_TO_REQUESTING_NEW_ERNP_ENTRY_TASK));
+ assertEquals("Transition To AddressSearchForm", true,
+ executionContext.get(Constants.TRANSITION_TO_GENERATE_GUI_QUERY_AUSTRIAN_RESIDENCE_TASK));
assertEquals("matching failed flag", true, executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED));
assertEquals("failed reason", "module.eidasauth.matching.22", executionContext.get(Constants.CONTEXT_FLAG_ADVANCED_MATCHING_FAILED_REASON));
assertNull("no final matching result", MatchingTaskUtils.getFinalMatchingResult(pendingReq));