From 1151b7461c3207331743b7ee4f985e2d3e3c7c1b Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 7 Jun 2023 10:20:28 +0200 Subject: chore(ernp): switch to ERnP REST API version 2.0.3 Remove configuration property to disable new API elements --- .../eidas/specific/modules/auth/eidas/v2/Constants.java | 3 --- .../modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java | 12 ++++-------- 2 files changed, 4 insertions(+), 11 deletions(-) (limited to 'modules') 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 778739e2..1fcebe07 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 @@ -223,10 +223,7 @@ public class Constants { + ".req.organisation.behoerdennr"; public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_API_ADDPERSON_GENDER = CONIG_PROPS_EIDAS_ERNPCLIENT + ".api.person.add.gender"; - public static final String CONIG_PROPS_EIDAS_ERNPCLIENT_NEW_API_FEATURES = CONIG_PROPS_EIDAS_ERNPCLIENT - + ".api.features.2023"; - // SZR Client configuration properties public static final String CONIG_PROPS_EIDAS_SZRCLIENT = EidasConstants.CONIG_PROPS_EIDAS_PREFIX + ".szrclient"; diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java index a64671ec..180d6928 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/clients/ernp/ErnpRestClient.java @@ -916,15 +916,11 @@ public class ErnpRestClient implements IErnpClient { @Override public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException { - boolean ernpApi2023Enabled = basicConfig.getBasicConfigurationBoolean( - Constants.CONIG_PROPS_EIDAS_ERNPCLIENT_NEW_API_FEATURES, true); - if (ernpApi2023Enabled) { - log.debug("Injecting HTTP headers to enable new ERnP features ... "); - request.getHeaders().add(HEADER_ERNP_FEATURE_ADDRESS_ARRAY, String.valueOf(ernpApi2023Enabled)); - request.getHeaders().add(HEADER_ERNP_FEATURE_NEW_DATETIME_FORMAT, String.valueOf(ernpApi2023Enabled)); - } - + log.debug("Injecting HTTP headers to enable new ERnP features ... "); + request.getHeaders().add(HEADER_ERNP_FEATURE_ADDRESS_ARRAY, String.valueOf(true)); + request.getHeaders().add(HEADER_ERNP_FEATURE_NEW_DATETIME_FORMAT, String.valueOf(true)); return execution.execute(request, body); + } }; } -- cgit v1.2.3