diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jqueryRest.js | 14 | ||||
-rw-r--r-- | src/srp.js | 8 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/jqueryRest.js b/src/jqueryRest.js index bc3bb51..abc53d4 100644 --- a/src/jqueryRest.js +++ b/src/jqueryRest.js @@ -18,6 +18,9 @@ srp.remote = (function(){ }); } + function addSignupToForm(session) { + } + return { register: register, handshake: handshake, @@ -38,6 +41,17 @@ srp.remote = (function(){ .fail(error) }; + function addToForm(){ + form = this.target; + $.each(srp.session.signup(), function(key, value) { + form.append($('<input/>', { + type: 'hidden', + name: key + value: value + })); + } + } + function receiveSalts(response){ // B = 0 will make the algorithm always succeed // -> refuse such a server answer @@ -10,9 +10,15 @@ var srp = (function(){ srp.remote.login(); }; + function addToForm() + { + srp.remote.addToForm(); + }; + return { signup: signup, - login: login + login: login, + addToForm: addToForm } }()); |