From 99fcc510193fe6ee7a67491a8dc5ecfac3637fb7 Mon Sep 17 00:00:00 2001 From: Hynek Mlnarik Date: Thu, 19 Jan 2017 16:02:53 +0100 Subject: [PATCH] KEYCLOAK-4261 Fix response type to SAML AuthnRequest messages --- .../main/java/org/keycloak/saml/SAML2ErrorResponseBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/saml-core/src/main/java/org/keycloak/saml/SAML2ErrorResponseBuilder.java b/saml-core/src/main/java/org/keycloak/saml/SAML2ErrorResponseBuilder.java index 6da6799b42..5873a7fd75 100755 --- a/saml-core/src/main/java/org/keycloak/saml/SAML2ErrorResponseBuilder.java +++ b/saml-core/src/main/java/org/keycloak/saml/SAML2ErrorResponseBuilder.java @@ -22,6 +22,7 @@ import java.util.List; import org.keycloak.dom.saml.v2.assertion.NameIDType; import org.keycloak.dom.saml.v2.protocol.ExtensionsType; import org.keycloak.dom.saml.v2.protocol.StatusResponseType; +import org.keycloak.dom.saml.v2.protocol.ResponseType; import org.keycloak.saml.common.exceptions.ConfigurationException; import org.keycloak.saml.common.exceptions.ParsingException; import org.keycloak.saml.common.exceptions.ProcessingException; @@ -66,7 +67,7 @@ public class SAML2ErrorResponseBuilder implements SamlProtocolExtensionsAwareBui public Document buildDocument() throws ProcessingException { try { - StatusResponseType statusResponse = new StatusResponseType(IDGenerator.create("ID_"), XMLTimeUtil.getIssueInstant()); + StatusResponseType statusResponse = new ResponseType(IDGenerator.create("ID_"), XMLTimeUtil.getIssueInstant()); statusResponse.setStatus(JBossSAMLAuthnResponseFactory.createStatusTypeForResponder(status)); NameIDType issuer = new NameIDType();