From fff770a866b44abce6fe0fc5d5ffde034225436d Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 25 Nov 2012 12:55:00 +0100 Subject: API: update instead of addToForm addToForm was an attempt to not use ajax but just the normal form submit. Turns out it's easy to add hidden fields to the form but quite cumbersome to remove the password fields from teh form so they are not submitted over the eventually untrusted channel. So we use ajax for updates just like for signup. --- src/srp.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/srp.js') diff --git a/src/srp.js b/src/srp.js index cbfdd10..efd50d2 100644 --- a/src/srp.js +++ b/src/srp.js @@ -10,15 +10,15 @@ var srp = (function(){ srp.remote.login(); }; - function addToForm() + function update(submitEvent) { - srp.remote.addToForm(); + srp.remote.update(submitEvent); }; return { signup: signup, - login: login, - addToForm: addToForm + update: update, + login: login } }()); -- cgit v1.2.3