use of org.keycloak.dom.saml.v1.assertion.SAML11EvidenceType in project keycloak by keycloak.
the class SAML11RequestWriter method write.
public void write(SAML11AuthorizationDecisionQueryType attr) throws ProcessingException {
StaxUtil.writeStartElement(writer, PROTOCOL_PREFIX, SAML11Constants.AUTHORIZATION_DECISION_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<SAML11ActionType> actions = attr.get();
for (SAML11ActionType action : actions) {
assertionWriter.write(action);
}
SAML11EvidenceType evidence = attr.getEvidence();
if (evidence != null) {
assertionWriter.write(evidence);
}
StaxUtil.writeEndElement(writer);
StaxUtil.flush(writer);
}
use of org.keycloak.dom.saml.v1.assertion.SAML11EvidenceType in project keycloak by keycloak.
the class SAML11AssertionWriter method write.
public void write(SAML11EvidenceType evidence) throws ProcessingException {
StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.EVIDENCE, ns);
List<String> assertionIDRefs = evidence.getAssertionIDReference();
for (String assertionIDRef : assertionIDRefs) {
StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.ASSERTION_ID_REF, ns);
StaxUtil.writeCharacters(writer, assertionIDRef);
StaxUtil.writeEndElement(writer);
}
List<SAML11AssertionType> assertions = evidence.getAssertions();
for (SAML11AssertionType assertion : assertions) {
write(assertion);
}
StaxUtil.writeEndElement(writer);
}
Aggregations