use of org.keycloak.dom.saml.v1.assertion.SAML11AttributeDesignatorType in project keycloak by keycloak.
the class SAML11RequestWriter method write.
public void write(SAML11AttributeQueryType attr) throws ProcessingException {
StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, SAML11Constants.ATTRIBUTE_QUERY, namespace);
URI resource = attr.getResource();
if (resource != null) {
StaxUtil.writeAttribute(writer, SAML11Constants.RESOURCE, resource.toString());
}
SAML11SubjectType subject = attr.getSubject();
if (subject != null) {
assertionWriter.write(subject);
}
List<SAML11AttributeDesignatorType> attributes = attr.get();
for (SAML11AttributeDesignatorType attribute : attributes) {
if (attribute instanceof SAML11AttributeType) {
SAML11AttributeType sat = (SAML11AttributeType) attribute;
assertionWriter.write(sat);
} else
throw logger.writerUnknownTypeError(attribute.getClass().getName());
}
StaxUtil.writeEndElement(writer);
StaxUtil.flush(writer);
}
Aggregations