summaryrefslogtreecommitdiff
path: root/users/app/assets/javascripts/users.js.coffee
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2012-10-17 10:12:11 -0700
committerjessib <jessib@riseup.net>2012-10-17 10:12:11 -0700
commitc072a2fe1d50715bad1cd8c14213cba6aa1cc8ff (patch)
tree14a599dadbe440952c0de73c487113bc09aa9142 /users/app/assets/javascripts/users.js.coffee
parent171d07a64d3f76e68c22f0fb4cc3795daad806d1 (diff)
parentd9a510fa2126c29f0af58c6bbeff35802777eee6 (diff)
Merge branch 'develop' into help_develop
Diffstat (limited to 'users/app/assets/javascripts/users.js.coffee')
-rw-r--r--users/app/assets/javascripts/users.js.coffee23
1 files changed, 13 insertions, 10 deletions
diff --git a/users/app/assets/javascripts/users.js.coffee b/users/app/assets/javascripts/users.js.coffee
index 160a7f0..1c00663 100644
--- a/users/app/assets/javascripts/users.js.coffee
+++ b/users/app/assets/javascripts/users.js.coffee
@@ -25,17 +25,20 @@ validate_password = (event) ->
return true
-insert_verifier = (event) ->
- # TODO: verify password confimation
- srp = new SRP
- salt = srp.session.getSalt()
- $('#srp_salt').val(salt)
- $('#srp_password_verifier').val(srp.session.getV().toString(16))
- # clear the password so we do not submit it
- $('#srp_password').val('cleared out - use verifier instead')
- $('#srp_password_confirmation').val('using srp - store verifier')
+signup = (event) ->
+ srp = new SRP(jqueryRest())
+ srp.register()
+ false
+
+login = (event) ->
+ srp = new SRP(jqueryRest())
+ srp.identify ->
+ window.location = '/'
+ false
+
$(document).ready ->
$('#new_user').submit validate_password
- $('#new_user').submit insert_verifier
+ $('#new_user').submit signup
+ $('#new_session').submit login