We're building a SAML solution, which at one stage involves us serving up a html form with various parameters prefilled, set to POST to an endpoint on a web service independent of us. This form is then automatically submitted via JavaScript. (i.e. this is SAML POST binding)
For debugging, it would be absurdly useful if we could find out if this auto-POST was successful. Does anybody have any ideas on how we could do that? Simply being able to get the HTTP status code, or being able to find out if the request times out, would be hugely helpful.
Current progress:
As far as I can tell, there's no way to check the actual result of the submission of a form directly, and I don't think you can get the status of the next request from the onunload event.
We'd be prepared to restructure this to instead do the POST with AJAX, but I don't think we can make this work against the other endpoint's domain. I'm also wondering if we could load the other page in a frame and get some information of that somehow, but I know that does also have its own set of cross-domain restrictions.
Finally we could try doing the POST server-side first and analysing that, but it's quite likely that the server we're hitting is on a network only locally available to the client, so that's probably just not feasible, in addition to having all sorts of problems with replay and so forth.
Any ideas or solutions would be extremely useful!