diff options
author | Thomas <> | 2022-06-07 13:48:34 +0200 |
---|---|---|
committer | Thomas <> | 2022-06-07 13:48:34 +0200 |
commit | db3af28b79296b6f5650a85c5a41ad5015c57222 (patch) | |
tree | c52f6d154b9f90f712185b8aaa070b7869b72f3f /modules/eidas_proxy-sevice/src/test/java/at | |
parent | 9c9463d593014292a4b19fbad2fca779e56e33cf (diff) | |
download | National_eIDAS_Gateway-db3af28b79296b6f5650a85c5a41ad5015c57222.tar.gz National_eIDAS_Gateway-db3af28b79296b6f5650a85c5a41ad5015c57222.tar.bz2 National_eIDAS_Gateway-db3af28b79296b6f5650a85c5a41ad5015c57222.zip |
feat(eidas): include IDA releated requested attributes into service-provider configuration
Diffstat (limited to 'modules/eidas_proxy-sevice/src/test/java/at')
-rw-r--r-- | modules/eidas_proxy-sevice/src/test/java/at/asitplus/eidas/specific/modules/msproxyservice/test/protocol/EidasProxyServiceControllerTest.java | 14 |
1 files changed, 13 insertions, 1 deletions
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()); } |