diff options
author | Thomas <> | 2022-12-15 17:56:49 +0100 |
---|---|---|
committer | Thomas <> | 2022-12-15 17:56:49 +0100 |
commit | fb04ef818546cf26ed1e623e5b565ac0961780fe (patch) | |
tree | a73b38fbc9d74e61ca56c20810485684940f1db2 /modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific | |
parent | 30f1ff7b45f3d05147329323751516ed8114c9f2 (diff) | |
download | National_eIDAS_Gateway-fb04ef818546cf26ed1e623e5b565ac0961780fe.tar.gz National_eIDAS_Gateway-fb04ef818546cf26ed1e623e5b565ac0961780fe.tar.bz2 National_eIDAS_Gateway-fb04ef818546cf26ed1e623e5b565ac0961780fe.zip |
feat(connector): add support for Ukraine eIDAS-ProxyService
Since Ukraine is not notified, we need a new configuration parameter to set not-notified LoA
Diffstat (limited to 'modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific')
2 files changed, 45 insertions, 0 deletions
diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/validation/EidasRequestPreProcessingFirstTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/validation/EidasRequestPreProcessingFirstTest.java index f3863ce0..b0290c90 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/validation/EidasRequestPreProcessingFirstTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/validation/EidasRequestPreProcessingFirstTest.java @@ -199,4 +199,25 @@ public class EidasRequestPreProcessingFirstTest { } + @Test + @SneakyThrows + public void prePreProcessUaWithoutConfig() throws EidPostProcessingException { + + final String testCountry = "UA"; + spConfig.put("loa", EaafConstants.EIDAS_LOA_LOW); + authnRequestBuilder.citizenCountryCode(testCountry); + authnRequestBuilder.levelOfAssurance(EaafConstants.EIDAS_LOA_LOW); + + preProcessor.preProcess(testCountry, pendingReq, authnRequestBuilder); + + final LightRequest lightReq = authnRequestBuilder.build(); + + Assert.assertNotSame("RequesterId was set", lightReq.getRequesterId()); + Assert.assertEquals("no PublicSP", "public", lightReq.getSpType()); + Assert.assertEquals("Requested attribute size not match", 4, lightReq.getRequestedAttributes().size()); + + Assert.assertEquals("wrong LoA", EaafConstants.EIDAS_LOA_LOW, lightReq.getLevelOfAssurance()); + + } + } diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/validation/EidasRequestPreProcessingSecondTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/validation/EidasRequestPreProcessingSecondTest.java index 0453ca1d..7cfd2d5c 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/validation/EidasRequestPreProcessingSecondTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/validation/EidasRequestPreProcessingSecondTest.java @@ -203,4 +203,28 @@ public class EidasRequestPreProcessingSecondTest { } + @Test + @SneakyThrows + public void prePreProcessUaWithConfig() throws EidPostProcessingException { + + basicConfig.putConfigValue( + "eidas.ms.auth.eIDAS.node_v2.loa.ua.requested", "http://eidas.europa.eu/NotNotified/LoA/high"); + + final String testCountry = "UA"; + authnRequestBuilder.citizenCountryCode(testCountry); + authnRequestBuilder.levelOfAssurance(EaafConstants.EIDAS_LOA_LOW); + + preProcessor.preProcess(testCountry, pendingReq, authnRequestBuilder); + + final LightRequest lightReq = authnRequestBuilder.build(); + + Assert.assertNotSame("RequesterId was set", lightReq.getRequesterId()); + Assert.assertEquals("no PublicSP", "public", lightReq.getSpType()); + Assert.assertEquals("Requested attribute size not match", 4, lightReq.getRequestedAttributes().size()); + + Assert.assertEquals("wrong LoA", "http://eidas.europa.eu/NotNotified/LoA/high", + lightReq.getLevelsOfAssurance().get(0).getValue()); + + } + } |