diff options
author | Thomas <> | 2022-03-10 14:54:04 +0100 |
---|---|---|
committer | Thomas <> | 2022-03-10 14:54:04 +0100 |
commit | 7405ddcd0bd5326c1a0e2e187086a90caad8ebea (patch) | |
tree | 6f92ff24cd32cfe10eb52b59f2c2ffadb3096742 | |
parent | 5ab8c1e33a1e4c4e4b782eb575f6ad0add4dfeec (diff) | |
download | National_eIDAS_Gateway-7405ddcd0bd5326c1a0e2e187086a90caad8ebea.tar.gz National_eIDAS_Gateway-7405ddcd0bd5326c1a0e2e187086a90caad8ebea.tar.bz2 National_eIDAS_Gateway-7405ddcd0bd5326c1a0e2e187086a90caad8ebea.zip |
chore(matching): set REST endpoint for search-address wizerd by GUI model parameter
4 files changed, 12 insertions, 5 deletions
diff --git a/basicConfig/templates/residency.html b/basicConfig/templates/residency.html index df3c10b7..d89b909c 100644 --- a/basicConfig/templates/residency.html +++ b/basicConfig/templates/residency.html @@ -43,7 +43,7 @@ } $.ajax({ type: "POST", - url: "http://localhost:8080/ms_connector/residency/search", + url: "$contextPath$wizardEndpoint", data: $("#inputForm").serialize() }).done(function (data, textStatus, jqXHR) { if (data["resultCount"] === 1) { diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java index 9a42af04..5dc9d3ef 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/controller/AdresssucheController.java @@ -151,7 +151,7 @@ public class AdresssucheController { /** * Performs search for addresses in ZMR. */ - @RequestMapping(value = {"/residency/search"}, method = {RequestMethod.POST}) + @RequestMapping(value = {MsEidasNodeConstants.ENDPOINT_RESIDENCY_SEARCH}, method = {RequestMethod.POST}) public ResponseEntity<AdresssucheResult> search( @RequestParam(PARAM_POSTLEITZAHL) String postleitzahl, @RequestParam(PARAM_MUNIPICALITY) String municipality, 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 56415f39..120c3189 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,7 +31,6 @@ import org.springframework.stereotype.Component; import at.asitplus.eidas.specific.core.MsEidasNodeConstants; import at.asitplus.eidas.specific.core.gui.StaticGuiBuilderConfiguration; -import at.gv.egiz.eaaf.core.api.gui.IGuiBuilderConfiguration; 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; @@ -48,6 +47,8 @@ import lombok.extern.slf4j.Slf4j; @Component("GenerateAustrianResidenceGuiTask") public class GenerateAustrianResidenceGuiTask extends AbstractAuthServletTask { + public static final String PARAM_FORMWIZARDPOINT = "wizardEndpoint"; + @Autowired private ISpringMvcGuiFormBuilder guiBuilder; @Autowired @@ -57,15 +58,20 @@ public class GenerateAustrianResidenceGuiTask extends AbstractAuthServletTask { public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { try { - final IGuiBuilderConfiguration config = new StaticGuiBuilderConfiguration( + final StaticGuiBuilderConfiguration config = new StaticGuiBuilderConfiguration( basicConfig, pendingReq, - basicConfig.getBasicConfiguration(//TODO + basicConfig.getBasicConfiguration( MsEidasNodeConstants.PROP_CONFIG_WEBCONTENT_TEMPLATES_RESIDENCY, MsEidasNodeConstants.TEMPLATE_HTML_RESIDENCY), MsEidasNodeConstants.ENDPOINT_RESIDENCY_INPUT, resourceLoader); + // inject REST end-point for wizard + config.putCustomParameterWithOutEscaption(null, + PARAM_FORMWIZARDPOINT, + MsEidasNodeConstants.ENDPOINT_RESIDENCY_SEARCH); + guiBuilder.build(request, response, config, "Query Austrian residency"); } catch (final Exception e) { diff --git a/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java b/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java index 12df7807..be5d7c7d 100644 --- a/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java +++ b/modules/core_common_lib/src/main/java/at/asitplus/eidas/specific/core/MsEidasNodeConstants.java @@ -152,6 +152,7 @@ public class MsEidasNodeConstants { public static final String ENDPOINT_COUNTRYSELECTION = "/myHomeCountry"; public static final String ENDPOINT_OTHER_LOGIN_METHOD_SELECTION = "/otherLoginMethod"; public static final String ENDPOINT_RESIDENCY_INPUT = "/residency"; + public static final String ENDPOINT_RESIDENCY_SEARCH = "/residency/search"; public static final String ENDPOINT_OTHER_CONTACTS_INPUT = "/otherContacts"; public static final String ENDPOINT_MONITORING_MONITOR = "/monitoring"; public static final String ENDPOINT_MONITORING_VERIFY = "/verify"; |