From fda1a8333b9bd11d0457125c3156a39f03d74bd6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 2 Aug 2019 12:02:35 +0200 Subject: Refactoring to eIDASNode 2.2, eaaf-components 1.0.8 --- .../authmodule_eIDASv2/validator/eIDASResponseValidator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/validator/eIDASResponseValidator.java') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/validator/eIDASResponseValidator.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/validator/eIDASResponseValidator.java index a659f337..f974232b 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/validator/eIDASResponseValidator.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/validator/eIDASResponseValidator.java @@ -48,7 +48,7 @@ import eu.eidas.auth.commons.protocol.eidas.LevelOfAssurance; public class eIDASResponseValidator { private static final Logger log = LoggerFactory.getLogger(eIDASResponseValidator.class); - public static void validateResponse(IRequest pendingReq, ILightResponse eIDASResponse, String spCountry, eIDASAttributeRegistry attrRegistry) throws eIDASValidationException { + public static void validateResponse(IRequest pendingReq, ILightResponse eIDASResponse, String spCountry, String citizenCountryCode, eIDASAttributeRegistry attrRegistry) throws eIDASValidationException { /*-----------------------------------------------------| * validate received LoA against minimum required LoA | @@ -139,11 +139,11 @@ public class eIDASResponseValidator { "No or empty citizen country"}); } - if (!split.getSecond().equalsIgnoreCase(spCountry)) { + if (!split.getFirst().equalsIgnoreCase(citizenCountryCode)) { log.warn("eIDAS attribute value for " + Constants.eIDAS_ATTR_PERSONALIDENTIFIER - + " includes a relaying-party country that does not match to service-provider country. " + + " includes a citizen country that does not match to service-provider country. " + " Value:" + natPersId - + " SP Country:" + spCountry); + + " citiczen Country:" + spCountry); throw new eIDASValidationException("eidas.07", new Object[]{ Constants.eIDAS_ATTR_PERSONALIDENTIFIER, -- cgit v1.2.3