The SAML response is extracted from the HTTP Request Body via fn:parse-xml-fragment#1. The existing XQuery code was expecting fn:parse-xml-fragment($resp) to return a value of type element(samlp:Response), however that is incorrect in theory, and also does not work in practice (tested on eXist-db 6.x.x and 7.x.x). The W3 spec for the XQuery function fn:parse-xml-fragment#1 specifies that a value of type document-node(element(samlp:Response)) will be returned. This PR fixes that bug.
The SAML response is extracted from the HTTP Request Body via
fn:parse-xml-fragment#1
. The existing XQuery code was expectingfn:parse-xml-fragment($resp)
to return a value of typeelement(samlp:Response)
, however that is incorrect in theory, and also does not work in practice (tested on eXist-db 6.x.x and 7.x.x). The W3 spec for the XQuery functionfn:parse-xml-fragment#1
specifies that a value of typedocument-node(element(samlp:Response))
will be returned. This PR fixes that bug.