From e55ff681bcc5a6c479530d1411a3da75912d78e5 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 28 Jun 2012 16:13:13 +0200 Subject: 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. --- example/public/srp.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'example/public/srp.js') 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(); +} -- cgit v1.2.3