Our team is currently developing a SAML solution that involves serving up an HTML form with pre-filled parameters, set to POST to a web service endpoint independent of our system. This form is then automatically submitted using JavaScript (SAML POST binding).
We are looking for a way to determine if this auto-POST process is successful for debugging purposes. It would be incredibly helpful if we could somehow obtain the HTTP status code or check if the request times out.
Our progress so far:
As it stands, we have not found a direct method to verify the result of the form submission, and retrieving the status of the next request from the onunload event seems unfeasible. We are open to restructuring the process to use AJAX for the POST, but accessing the other domain presents challenges. We also considered loading the other page in a frame to gather information, but cross-domain restrictions pose obstacles.
Another option could involve performing the POST server-side first and analyzing the results, but the server may only be accessible locally to the client network, making this approach impractical. Additionally, issues related to replay attacks further complicate matters.
Any suggestions or solutions would be greatly appreciated!