summaryrefslogtreecommitdiff
path: root/example/public
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-06-28 16:13:13 +0200
committerAzul <azul@leap.se>2012-06-28 16:13:13 +0200
commite55ff681bcc5a6c479530d1411a3da75912d78e5 (patch)
treeaca518663d05f3093520fd3b5d0449efe0b7eb84 /example/public
parent424c80fde151d4507cd34aaf8f116016df405c8a (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.js10
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();
+}