From f4f58ab7074171ade641af7b7436a63c96a82818 Mon Sep 17 00:00:00 2001 From: Konstantinos Georgilakis Date: Mon, 14 Sep 2020 12:06:32 +0300 Subject: [PATCH] KEYCLOAK-15540 correct SAMLAttributeConsumingServiceParser --- .../saml/metadata/SAMLAttributeConsumingServiceParser.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/metadata/SAMLAttributeConsumingServiceParser.java b/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/metadata/SAMLAttributeConsumingServiceParser.java index 6bdded981b..7355e0c0a2 100644 --- a/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/metadata/SAMLAttributeConsumingServiceParser.java +++ b/saml-core/src/main/java/org/keycloak/saml/processing/core/parsers/saml/metadata/SAMLAttributeConsumingServiceParser.java @@ -47,7 +47,10 @@ public class SAMLAttributeConsumingServiceParser extends AbstractStaxSamlMetadat break; case SERVICE_DESCRIPTION: - target.addServiceDescription(new LocalizedNameType(StaxParserUtil.getAttributeValue(elementDetail, ATTR_LANG))); + LocalizedNameType serviceDescription = new LocalizedNameType(StaxParserUtil.getAttributeValue(elementDetail, ATTR_LANG)); + StaxParserUtil.advance(xmlEventReader); + serviceDescription.setValue(StaxParserUtil.getElementText(xmlEventReader)); + target.addServiceDescription(serviceDescription); break; case REQUESTED_ATTRIBUTE: