diff options
author | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2021-01-12 13:35:02 +0100 |
---|---|---|
committer | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2021-01-12 14:31:44 +0100 |
commit | f74e02f9f0735ff9a1e897c5eba10f69ff720f8f (patch) | |
tree | e7dfa044d28e2503cb0f24769ff955f1850adf29 | |
parent | 03830b4462b3f11acd28a63ab05c3105bc19e094 (diff) | |
download | National_eIDAS_Gateway-f74e02f9f0735ff9a1e897c5eba10f69ff720f8f.tar.gz National_eIDAS_Gateway-f74e02f9f0735ff9a1e897c5eba10f69ff720f8f.tar.bz2 National_eIDAS_Gateway-f74e02f9f0735ff9a1e897c5eba10f69ff720f8f.zip |
created tasks and beans
10 files changed, 318 insertions, 68 deletions
diff --git a/connector/src/test/resources/config/templates/chooseOtherLoginMethod.html b/connector/src/test/resources/config/templates/chooseOtherLoginMethod.html new file mode 100644 index 00000000..134f7fba --- /dev/null +++ b/connector/src/test/resources/config/templates/chooseOtherLoginMethod.html @@ -0,0 +1,250 @@ +<!DOCTYPE html> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorator="fragments/base" + th:with="lang=${#locale.language}" th:lang="${lang}"> +<head> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="$contextPath/static/css/css_country.css" th:href="@{/static/css/css_country.css}"/> + <title th:text="#{gui.countryselection.title}">eIDAS-Login Login-Auswahl</title> + <script type="text/javascript"> + </script> + <style> + body { + background-image: none; + margin: 0px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } + + div.header { + background-color: #e9ecef; + padding-top: 28px; + padding-left: 137px; + padding-right: 137px; + padding-bottom: 12px; + } + + div.titlebar { + padding: 0px; + } + + div.titlebar div { + } + + .hidden { + display: none; + } + + ul.nav_oben { + padding: 0px; + margin: 0px; + text-align: right; + text-transform: uppercase; + } + + li { + display: inline-block; + } + + div.header a { + text-decoration: none; + color: black; + } + + a { + text-decoration: none; + color: #a22c1c; + } + + .block { + /* override country.css */ + width: 200px; + padding-bottom: 20px; + } + + @media only screen and (min-width: 1000px) { + div.header { + padding-left: 137px; + padding-right: 137px; + } + + .content { + padding-left: 137px; + padding-right: 137px; + } + + footer { + padding-left: 137px; + padding-right: 137px; + } + } + + @media only screen and (max-width: 999px) { + div.header { + padding-left: 1em; + padding-right: 1em; + } + + .content { + padding-left: 1em; + padding-right: 1em; + } + + footer { + padding-left: 1em; + padding-right: 1em; + } + } + + div.subtitle h1 { + padding: 0px; + margin: 0px; + font-size: 130%; + align: right; + } + + div.subtitle h2 { + padding: 0px; + margin: 0px; + font-size: 115%; + } + + footer { + left: 0; + padding-top: 1em; + bottom: 0; + width: 100%; + height: 2em; + background-color: rgb(162, 44, 28); + color: white; + } + + .float { + float: left; + } + + .floatright { + float: right; + } + + .copyright { + width: 66%; + font-size: 80%; + } + + #countries { + padding-bottom: 40px; + } + + #country { + padding-bottom: 20px; + } + + input[type=submit] { + width: inherit; + /* text-align: left; */ + } + + form { + justify-content: center; + } + </style> + <script type="text/javascript"> + + /* Element.closest polyfill - https://developer.mozilla.org/en-US/docs/Web/API/Element/closest License: public domain*/ + if (!Element.prototype.matches) + Element.prototype.matches = Element.prototype.msMatchesSelector || + Element.prototype.webkitMatchesSelector; + + if (!Element.prototype.closest) + Element.prototype.closest = function (s) { + var el = this; + if (!document.documentElement.contains(el)) return null; + do { + if (el.matches(s)) return el; + el = el.parentElement || el.parentNode; + } while (el !== null && el.nodeType === 1); + return null; + }; + + + function clickCountryFlag(element) { + if (!element) return false; + + var form = element.closest("form"); + + if (!form) return false; + + form.submit(); + return false; + } + </script> +</head> +<body> +<div class="header container"> + <div class="titlebar"> + <div> + <a href="https://www.bmi.gv.at/" target="_blank" title="Home"> + <img class="toplogo img-responsive" src="/static/BMI.png" alt="Logo BMI" + th:attr="alt=#{gui.countryselection.logo.bmi.alt}"> + <h1 class="hidden" th:text="#{gui.countryselection.header1}"> Bundesministerium für Inneres </h1> + </a> + </div> + <ul class="nav_oben"> + <li> + <div class="languageselection" th:include="language_selection :: selectlanguage"> + LanguageSelectionBlock + </div> + </li> + + <li><a href="https://www.bmi.gv.at/" target="_blank" th:text="#{gui.countryselection.link.bmi}"> Startseite + BMI </a></li> + </ul> + </div> +</div> +<div class="content"> + <div class="subtitle"> + <h1 th:text="#{gui.countryselection.header2}"> Zentraler eIDAS Knoten der Republik Österreich </h1> + <h2 th:text="#{gui.countryselection.header3}"> Betrieben durch das Bundesministerium für Inneres </h2> + </div> + + <h1 th:text="#{gui.countryselection.header.selection}"> Wählen Sie Ihr Land / Select your country </h1> + + <div id="country"> + <!-- Active countries --> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <input type="submit" role="button" value="Handy-Signatur / Mobile Signature" + th:attr="value=#{gui.countryselection.country.de}"/> + <input type="hidden" name="selectedCountry" value="HS"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/> + </form> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <input type="submit" role="button" value="Andere eIDAS ID" + th:attr="value=#{gui.countryselection.country.de}"/> + <input type="hidden" name="selectedCountry" value="EIDAS"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/> + </form> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <input type="submit" role="button" value="Keine weitere HS / eIDAS" + th:attr="value=#{gui.countryselection.country.de}"/> + <input type="hidden" name="selectedCountry" value="NONE"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"/> + </form> + </div> + + <!-- Abbrechen Button --> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <input type="submit" class="btn btn-outline-primary btn-block" value="Abbrechen/Cancel" + th:attr="value=#{gui.countryselection.cancle}"> + <input type="hidden" name="stopAuthProcess" value="true"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"> + </form> + +</div> +<footer> + <div class="copyright">© BUNDESMINISTERIUM FÜR INNERES</div> + <div></div> +</footer> +</body> +</html> diff --git a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/MsEidasNodeConstants.java b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/MsEidasNodeConstants.java index 42fefaab..1300ad74 100644 --- a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/MsEidasNodeConstants.java +++ b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/MsEidasNodeConstants.java @@ -46,8 +46,8 @@ public class MsEidasNodeConstants { public static final String PROP_CONFIG_WEBCONTENT_TEMPLATES_PATH = "webcontent.templates"; public static final String PROP_CONFIG_WEBCONTENT_TEMPLATES_CCSELECTION = "webcontent.templates.countryselection"; - public static final String PROP_CONFIG_WEBCONTENT_TEMPLATES_OTHER_LOGIN_METHOD_SELECTION = "webcontent.templates" + - ".otherLoginMethodselection"; + public static final String PROP_CONFIG_WEBCONTENT_TEMPLATES_OTHER_LOGIN_METHOD_SELECTION = "webcontent.templates" + + ".otherLoginMethodselection"; public static final String PROP_CONFIG_MONITORING_EIDASNODE_METADATAURL = "monitoring.eIDASNode.metadata.url"; diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnbEntryTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java index 77d6ed41..6f7304c9 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnbEntryTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/CreateNewErnpEntryTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 A-SIT Plus GmbH + * Copyright 2021 A-SIT Plus GmbH * AT-specific eIDAS Connector has been developed in a cooperation between EGIZ, * A-SIT Plus GmbH, A-SIT, and Graz University of Technology. * @@ -35,23 +35,12 @@ import javax.servlet.http.HttpServletResponse; /** * Task that searches ErnB and ZMR before adding person to SZR. * - * @author tlenz + * @author amarsalek */ @Slf4j @Component("CreateNewErnbEntryTask") -// NOTE: General: Please rebase git commit and squash them where useful, i.e. "remove unused import" should -// not be a separate commit. -public class CreateNewErnbEntryTask extends AbstractAuthServletTask { +public class CreateNewErnpEntryTask extends AbstractAuthServletTask { - - /* - * (non-Javadoc) - * - * @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv. - * egovernment.moa.id.process.api.ExecutionContext, - * javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - */ @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiTask.java index d55d4a7e..3d77f994 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 A-SIT Plus GmbH + * Copyright 2021 A-SIT Plus GmbH * AT-specific eIDAS Connector has been developed in a cooperation between EGIZ, * A-SIT Plus GmbH, A-SIT, and Graz University of Technology. * @@ -41,12 +41,10 @@ import javax.servlet.http.HttpServletResponse; /** * Task that searches ErnB and ZMR before adding person to SZR. * - * @author tlenz + * @author amarsalek */ @Slf4j @Component("GenerateGuiTask") -// NOTE: General: Please rebase git commit and squash them where useful, i.e. "remove unused import" should -// not be a separate commit. public class GenerateGuiTask extends AbstractAuthServletTask { @Autowired @@ -54,14 +52,6 @@ public class GenerateGuiTask extends AbstractAuthServletTask { @Autowired IConfiguration basicConfig; - /* - * (non-Javadoc) - * - * @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv. - * egovernment.moa.id.process.api.ExecutionContext, - * javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - */ @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateMobilePhoneSignatureRequestTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateMobilePhoneSignatureRequestTask.java index c9974509..7c154705 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateMobilePhoneSignatureRequestTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateMobilePhoneSignatureRequestTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 A-SIT Plus GmbH + * Copyright 2021 A-SIT Plus GmbH * AT-specific eIDAS Connector has been developed in a cooperation between EGIZ, * A-SIT Plus GmbH, A-SIT, and Graz University of Technology. * @@ -35,23 +35,13 @@ import javax.servlet.http.HttpServletResponse; /** * Task that searches ErnB and ZMR before adding person to SZR. * - * @author tlenz + * @author amarsalek */ @Slf4j @Component("GenerateMobilePhoneSignatureRequestTask") -// NOTE: General: Please rebase git commit and squash them where useful, i.e. "remove unused import" should -// not be a separate commit. public class GenerateMobilePhoneSignatureRequestTask extends AbstractAuthServletTask { - /* - * (non-Javadoc) - * - * @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv. - * egovernment.moa.id.process.api.ExecutionContext, - * javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - */ @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveGuiResponseTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveGuiResponseTask.java index b0cb857e..fc51ce2d 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveGuiResponseTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveGuiResponseTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 A-SIT Plus GmbH + * Copyright 2021 A-SIT Plus GmbH * AT-specific eIDAS Connector has been developed in a cooperation between EGIZ, * A-SIT Plus GmbH, A-SIT, and Graz University of Technology. * @@ -40,24 +40,14 @@ import java.util.Enumeration; /** * Task that searches ErnB and ZMR before adding person to SZR. * - * @author tlenz + * @author amarsalek */ @Slf4j @Component("ReceiveGuiResponseTask") -// NOTE: General: Please rebase git commit and squash them where useful, i.e. "remove unused import" should -// not be a separate commit. public class ReceiveGuiResponseTask extends AbstractAuthServletTask { - final String LOGIN_METHOD = "loginSelection"; + final String loginMethod = "loginSelection"; - /* - * (non-Javadoc) - * - * @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv. - * egovernment.moa.id.process.api.ExecutionContext, - * javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - */ @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { @@ -68,10 +58,10 @@ public class ReceiveGuiResponseTask extends AbstractAuthServletTask { final String paramName = reqParamNames.nextElement(); if (StringUtils.isNotEmpty(paramName) && !EaafConstants.PROCESS_ENGINE_PENDINGREQUESTID.equalsIgnoreCase(paramName)) { - if (LOGIN_METHOD.equalsIgnoreCase(paramName)) { + if (loginMethod.equalsIgnoreCase(paramName)) { String value = StringEscapeUtils.escapeHtml(request.getParameter(paramName)); SelectedLoginMethod selection = SelectedLoginMethod.valueOf(value); - executionContext.put(LOGIN_METHOD, selection); + executionContext.put(loginMethod, selection); } } } diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java index 28c351f2..95eeca4c 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/ReceiveMobilePhoneSignatureResponseTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 A-SIT Plus GmbH + * Copyright 2021 A-SIT Plus GmbH * AT-specific eIDAS Connector has been developed in a cooperation between EGIZ, * A-SIT Plus GmbH, A-SIT, and Graz University of Technology. * @@ -35,23 +35,12 @@ import javax.servlet.http.HttpServletResponse; /** * Task that searches ErnB and ZMR before adding person to SZR. * - * @author tlenz + * @author amarsalek */ @Slf4j @Component("ReceiveMobilePhoneSignatureResponseTask") -// NOTE: General: Please rebase git commit and squash them where useful, i.e. "remove unused import" should -// not be a separate commit. public class ReceiveMobilePhoneSignatureResponseTask extends AbstractAuthServletTask { - - /* - * (non-Javadoc) - * - * @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv. - * egovernment.moa.id.process.api.ExecutionContext, - * javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - */ @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml index e199d379..5134982a 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eIDAS.Authentication.process.xml @@ -13,6 +13,18 @@ <pd:Task id="initialRegisterSearch" class="InitialSearchTask" /> + <pd:Task id="CreateNewErnpEntryTask" + class="CreateNewErnpEntryTask" /> + <pd:Task id="GenerateGuiTask" + class="GenerateGuiTask" /> + <pd:Task id="GenerateMobilePhoneSignatureRequestTask" + class="GenerateMobilePhoneSignatureRequestTask" /> + <pd:Task id="ReceiveGuiResponseTask" + class="ReceiveGuiResponseTask" /> + <pd:Task id="ReceiveMobilePhoneSignatureResponseTask" + class="ReceiveMobilePhoneSignatureResponseTask" /> + + <pd:StartEvent id="start" /> <pd:Transition from="start" diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml index ca6eba20..06269bfc 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/eidas_v2_auth.beans.xml @@ -105,4 +105,24 @@ class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.InitialSearchTask" scope="prototype" /> + <bean id="CreateNewErnpEntryTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.CreateNewErnpEntryTask" + scope="prototype" /> + + <bean id="GenerateGuiTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateGuiTask" + scope="prototype" /> + + <bean id="GenerateMobilePhoneSignatureRequestTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateMobilePhoneSignatureRequestTask" + scope="prototype" /> + + <bean id="ReceiveGuiResponseTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveGuiResponseTask" + scope="prototype" /> + + <bean id="ReceiveMobilePhoneSignatureResponseTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveMobilePhoneSignatureResponseTask" + scope="prototype" /> + </beans>
\ No newline at end of file diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml index 10d480e0..7d7f2c59 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml @@ -78,4 +78,24 @@ <bean id="IT-Specific-Search" class="at.asitplus.eidas.specific.modules.auth.eidas.v2.handler.ItSpecificDetailSearchProcessor"> </bean> + + <bean id="CreateNewErnpEntryTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.CreateNewErnpEntryTask" + scope="prototype" /> + + <bean id="GenerateGuiTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateGuiTask" + scope="prototype" /> + + <bean id="GenerateMobilePhoneSignatureRequestTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.GenerateMobilePhoneSignatureRequestTask" + scope="prototype" /> + + <bean id="ReceiveGuiResponseTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveGuiResponseTask" + scope="prototype" /> + + <bean id="ReceiveMobilePhoneSignatureResponseTask" + class="at.asitplus.eidas.specific.modules.auth.eidas.v2.tasks.ReceiveMobilePhoneSignatureResponseTask" + scope="prototype" /> </beans>
\ No newline at end of file |