KEYCLOAK-15465 SAML Identity Broker - SP metadata writer always emits AttributeConsumingService isDefault attribute
The isDefault attribute is defined as optional, yet if it set to null Keycloak incorrectly emits the value isDefault="null".
This commit is contained in:
parent
10077b1efe
commit
3973d47bd4
1 changed files with 4 additions and 2 deletions
|
@ -351,7 +351,9 @@ public class SAMLMetadataWriter extends BaseWriter {
|
||||||
StaxUtil.writeStartElement(writer, METADATA_PREFIX, JBossSAMLConstants.ATTRIBUTE_CONSUMING_SERVICE.get(),
|
StaxUtil.writeStartElement(writer, METADATA_PREFIX, JBossSAMLConstants.ATTRIBUTE_CONSUMING_SERVICE.get(),
|
||||||
JBossSAMLURIConstants.METADATA_NSURI.get());
|
JBossSAMLURIConstants.METADATA_NSURI.get());
|
||||||
|
|
||||||
StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISDEFAULT.get(), "" + attributeConsumer.isIsDefault());
|
if (attributeConsumer.isIsDefault() != null)
|
||||||
|
StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISDEFAULT.get(), "" + attributeConsumer.isIsDefault());
|
||||||
|
|
||||||
StaxUtil.writeAttribute(writer, JBossSAMLConstants.INDEX.get(), "" + attributeConsumer.getIndex());
|
StaxUtil.writeAttribute(writer, JBossSAMLConstants.INDEX.get(), "" + attributeConsumer.getIndex());
|
||||||
|
|
||||||
// Service Name
|
// Service Name
|
||||||
|
@ -561,4 +563,4 @@ public class SAMLMetadataWriter extends BaseWriter {
|
||||||
|
|
||||||
StaxUtil.writeEndElement(writer);
|
StaxUtil.writeEndElement(writer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue