X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=experiments%2Fspclient%2Fmkws.js;h=af9ba2152b55ba7a802971b13aa1cfd28209b9b6;hb=91e0c33b42f567a97dd88b0f415c4a4d5455ac89;hp=07c1f06a6778ebc06ba4fa83b041b3ba39c01b94;hpb=de1219daa747d628ffcb9095311c38ee4fc46824;p=mkws-moved-to-github.git diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 07c1f06..af9ba21 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -426,23 +426,25 @@ $(document).ready(function() { domReady(); }); -$(document).ready(function() { - if (useServiceProxy) { - var jqxhr = jQuery.get(authURLServiceProxy) - .fail(function() { - alert("service proxy authentification failed for URL " + authURLServiceProxy + " , give up!"); - }) - .success(function(data) { - if (!jQuery.isXMLDoc(data)) { - alert("service proxy auth response document is not valid XML document, give up!"); - return; - } - - var status = $(data).find("status"); - if (status.text() != "OK") { +function mkws_service_proxy_auth() { + var jqxhr = jQuery.get("/service-proxy-auth") + .fail(function() { + alert("service proxy authentification failed, give up!"); + }) + .success(function(data) { + if (!jQuery.isXMLDoc(data)) { + alert("service proxy auth response document is not valid XML document, give up!"); + return; + } + var status = $(data).find("status"); + if (status.text() != "OK") { alert("service proxy auth repsonse status: " + status.text() + ", give up!"); return; - } - }); - } + } + }); +} + +$(document).ready(function() { + mkws_service_proxy_auth(); }); +