diff --git a/browserid/static/dialog/resources/browserid-network.js b/browserid/static/dialog/resources/browserid-network.js index f49b37c4279c38395046877c190969a3893adb0f..7fa3212803a85f7a77433d94f97ff07cb7a1b347 100644 --- a/browserid/static/dialog/resources/browserid-network.js +++ b/browserid/static/dialog/resources/browserid-network.js @@ -248,13 +248,13 @@ var BrowserIDNetwork = (function() { /** * Call with a token to prove an email address ownership. - * @method proveEmailOwnership + * @method completeEmailRegistration * @param {string} token - token proving email ownership. * @param {function} [onSuccess] - Callback to call when complete. Called * with one boolean parameter that specifies the validity of the token. * @param {function} [onFailure] - Called on XHR failure. */ - proveEmailOwnership: function(token, onSuccess, onFailure) { + completeEmailRegistration: function(token, onSuccess, onFailure) { withCSRF(function() { xhr.ajax({ type: "POST", diff --git a/browserid/static/dialog/test/qunit/browserid-network_test.js b/browserid/static/dialog/test/qunit/browserid-network_test.js index ef50db43801ad0cbb73eec0cf2f484b1690b0f1c..653a4023b6f549cd09e7c2994e1385d6e76a40bb 100644 --- a/browserid/static/dialog/test/qunit/browserid-network_test.js +++ b/browserid/static/dialog/test/qunit/browserid-network_test.js @@ -191,7 +191,7 @@ steal.plugins("jquery", "funcunit/qunit").then("/dialog/resources/browserid-netw test("complete_email_addition valid", function() { - network.proveEmailOwnership("goodtoken", function onSuccess(proven) { + network.completeEmailRegistration("goodtoken", function onSuccess(proven) { equal(proven, true, "good token proved"); start(); }, function onFailure() { @@ -203,7 +203,7 @@ steal.plugins("jquery", "funcunit/qunit").then("/dialog/resources/browserid-netw test("complete_email_addition with invalid token", function() { xhr.useResult("invalid"); - network.proveEmailOwnership("badtoken", function onSuccess(proven) { + network.completeEmailRegistration("badtoken", function onSuccess(proven) { equal(proven, false, "bad token could not be proved"); start(); }, function onFailure() { diff --git a/browserid/views/prove.ejs b/browserid/views/prove.ejs index 8814e62f3e14e28ea8cfe7ebc5b3ed1569b5a9fa..17439c745cfb5ba0b5714d53c78af35e39cc9bef 100644 --- a/browserid/views/prove.ejs +++ b/browserid/views/prove.ejs @@ -36,7 +36,7 @@ function failure(why) { $(function() { var token = getParameterByName("token"); - BrowserIDNetwork.proveEmailOwnership(token, function onSuccess(valid) { + BrowserIDNetwork.completeEmailRegistration(token, function onSuccess(valid) { if (valid) { success(); } else {