Changes:
* The test.html script now respects the server path form field,
rather than insisting on "/gss"
* The server path field now defaults to "/gss/" so that we don't
get a HTTP 301 (Redirect) return code
* The gssweb object now opens the XHR connection with each message,
instead of assuming incorrectly that the connection will remain
open after each XHR response completes.
<label for="authenticate_server_path">Server Path:</label>
<input name="authenticate_server_path"
id="authenticate_server_path"
- value="/gss" />
+ value="/gss/" />
</div>
<button id="authenticate">authenticate</button>
function doAuthenticate() {
gssweb = gssweb || new navigator.gssweb({
- serverPath: "/gss",
+ serverPath: document.getElementById('authenticate_server_path').value,
appTag: "Authentication Test",
error: function(errMsg) {
report(errMsg, '#authenticate_response');
this.serverToken = "";
this.clientCred = "";
this.xhr = new XMLHttpRequest();
- this.xhr.open("POST", this.serverPath, true);
- this.xhr.setRequestHeader(
- 'Content-Type',
- 'application/x-www-form-urlencoded'
- );
this.xhr.onreadystatechange = this.recvTokenFromServer.bind(this);
this.gss = new navigator.gss_eap({
var msg = "nonce=" + this.nonce +
"&token=" + encodeURIComponent(this.clientToken);
+ this.xhr.open("POST", this.serverPath, true);
+ this.xhr.setRequestHeader(
+ 'Content-Type',
+ 'application/x-www-form-urlencoded'
+ );
this.xhr.send(msg);
};