use of org.keycloak.dom.saml.v2.metadata.KeyTypes in project keycloak by keycloak.
the class SAMLMetadataWriter method writeKeyDescriptor.
public void writeKeyDescriptor(KeyDescriptorType keyDescriptor) throws ProcessingException {
StaxUtil.writeStartElement(writer, METADATA_PREFIX, JBossSAMLConstants.KEY_DESCRIPTOR.get(), JBossSAMLURIConstants.METADATA_NSURI.get());
KeyTypes keyTypes = keyDescriptor.getUse();
if (keyTypes != null)
StaxUtil.writeAttribute(writer, new QName(JBossSAMLConstants.USE.get()), keyTypes.value());
Element keyInfo = keyDescriptor.getKeyInfo();
StaxUtil.writeDOMElement(writer, keyInfo);
StaxUtil.writeEndElement(writer);
StaxUtil.flush(writer);
}