summaryrefslogtreecommitdiff
path: root/example/public/srp.js
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-07-03 14:24:17 +0200
committerAzul <azul@leap.se>2012-07-03 14:24:17 +0200
commit7367bf009d778d96c1c40a20c055bba0596ab2b4 (patch)
tree74f2786c51d5af9adec4696a459ca485633fcdb5 /example/public/srp.js
parent458975ce0e17a5d752ac99f68a23236b7f078519 (diff)
fixed workflow and reduced copy
Diffstat (limited to 'example/public/srp.js')
-rw-r--r--example/public/srp.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/example/public/srp.js b/example/public/srp.js
index 51aba5c..4a4b9ee 100644
--- a/example/public/srp.js
+++ b/example/public/srp.js
@@ -5,15 +5,22 @@ $(document).ready(function(){
function on_login(event) {
srp = new SRP();
+ srp.success= on_authenticated;
srp.identify();
event.preventDefault();
}
function on_signup(event) {
srp = new SRP();
- srp.success = function() {
- alert("Signed up successfully");
- };
+ srp.registered_user = on_registered;
srp.register();
event.preventDefault();
}
+
+function on_registered() {
+ window.location = '/';
+}
+
+function on_authenticated() {
+ window.location = '/';
+}