From db3af28b79296b6f5650a85c5a41ad5015c57222 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Tue, 7 Jun 2022 13:48:34 +0200 Subject: feat(eidas): include IDA releated requested attributes into service-provider configuration --- .../test/protocol/EidasProxyServiceControllerTest.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'modules/eidas_proxy-sevice/src/test/java/at/asitplus') diff --git a/modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/msproxyservice/test/protocol/EidasProxyServiceControllerTest.java b/modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/msproxyservice/test/protocol/EidasProxyServiceControllerTest.java index 189378e0..ef1abbcd 100644 --- a/modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/msproxyservice/test/protocol/EidasProxyServiceControllerTest.java +++ b/modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/msproxyservice/test/protocol/EidasProxyServiceControllerTest.java @@ -277,7 +277,10 @@ public class EidasProxyServiceControllerTest { .spType("public") .requestedAttributes(ImmutableAttributeMap.builder() .put(attrRegistry.getCoreAttributeRegistry().getByFriendlyName( - EidasConstants.eIDAS_ATTR_PERSONALIDENTIFIER).first()).build()); + EidasConstants.eIDAS_ATTR_PERSONALIDENTIFIER).first()) + .put(attrRegistry.getCoreAttributeRegistry().getByFriendlyName( + EidasConstants.eIDAS_ATTR_BIRTHNAME).first()) + .build()); proxyService.setiLightRequest(authnReqBuilder.build()); @@ -326,6 +329,9 @@ public class EidasProxyServiceControllerTest { assertTrue("mandateprofiles not empty", spConfig.getMandateProfiles().isEmpty()); assertEquals("MandateMode", SpMandateModes.NONE, spConfig.getMandateMode()); + assertEquals("requested IDA attributes", 3, spConfig.getRequestedAttributes().size()); + + } @Test @@ -370,6 +376,8 @@ public class EidasProxyServiceControllerTest { .forEach(el -> assertTrue("missing mandateProfile: " + el, mandateProfilesNat.contains(el))); assertEquals("MandateMode", SpMandateModes.NATURAL, spConfig.getMandateMode()); + assertEquals("requested IDA attributes", 6, spConfig.getRequestedAttributes().size()); + } @Test @@ -414,6 +422,8 @@ public class EidasProxyServiceControllerTest { .forEach(el -> assertTrue("missing mandateProfile: " + el, mandateProfilesJur.contains(el))); assertEquals("MandateMode", SpMandateModes.LEGAL_FORCE, spConfig.getMandateMode()); + assertEquals("requested IDA attributes", 9, spConfig.getRequestedAttributes().size()); + } @Test @@ -481,6 +491,8 @@ public class EidasProxyServiceControllerTest { assertNotNull("mandateprofiles", spConfig.getMandateProfiles()); assertTrue("mandateprofiles not empty", spConfig.getMandateProfiles().isEmpty()); assertEquals("MandateMode", SpMandateModes.NONE, spConfig.getMandateMode()); + + assertEquals("requested IDA attributes", 3, spConfig.getRequestedAttributes().size()); } -- cgit v1.2.3