diff options
author | Azul <azul@leap.se> | 2012-06-28 16:13:13 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-06-28 16:13:13 +0200 |
commit | e55ff681bcc5a6c479530d1411a3da75912d78e5 (patch) | |
tree | aca518663d05f3093520fd3b5d0449efe0b7eb84 /example/public | |
parent | 424c80fde151d4507cd34aaf8f116016df405c8a (diff) |
complete ajax flow is working - just auth fails
Also we currently generate the salt on the server - this should happen on the client but for now i stick to the srp-js workflow.
Diffstat (limited to 'example/public')
-rw-r--r-- | example/public/srp.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/example/public/srp.js b/example/public/srp.js index e68e220..51aba5c 100644 --- a/example/public/srp.js +++ b/example/public/srp.js @@ -1,5 +1,6 @@ $(document).ready(function(){ $('#login-btn').click(on_login); + $('#signup-btn').click(on_signup); }); function on_login(event) { @@ -7,3 +8,12 @@ function on_login(event) { srp.identify(); event.preventDefault(); } + +function on_signup(event) { + srp = new SRP(); + srp.success = function() { + alert("Signed up successfully"); + }; + srp.register(); + event.preventDefault(); +} |