Search in sources :

Example 1 with KeyTypes

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);
}
Also used : QName(javax.xml.namespace.QName) Element(org.w3c.dom.Element) KeyTypes(org.keycloak.dom.saml.v2.metadata.KeyTypes)

Aggregations

QName (javax.xml.namespace.QName)1 KeyTypes (org.keycloak.dom.saml.v2.metadata.KeyTypes)1 Element (org.w3c.dom.Element)1