summaryrefslogtreecommitdiff
path: root/src/srp_register.js
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-07-20 11:12:22 +0200
committerAzul <azul@leap.se>2012-07-20 11:12:22 +0200
commit057ff90cae59196d61dcdb46babb8d228dedcf97 (patch)
tree396428d2591881381adb21cd34d8beb9a6cba950 /src/srp_register.js
parent50de80c5e817476ac95a096c718a66f5555fcd05 (diff)
added an index file to use with sprockets
Diffstat (limited to 'src/srp_register.js')
-rw-r--r--src/srp_register.js46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/srp_register.js b/src/srp_register.js
deleted file mode 100644
index 3966d79..0000000
--- a/src/srp_register.js
+++ /dev/null
@@ -1,46 +0,0 @@
-function SRP_REGISTER()
-{
- var that;
-
- // Initiate the registration process
- SRP.prototype.register = function()
- {
- that = this;
- var handshake_url = this.geturl() + this.paths("register/salt/");
- var params = "I="+this.getI();
- this.ajaxRequest(handshake_url, params, this.register_receive_salt);
- };
-
- // Receive the salt for registration
- SRP.prototype.register_receive_salt = function(response)
- {
- if(response.salt)
- {
- var s = response.salt;
- var x = that.calcX(s);
- var v = that.getg().modPow(x, that.getN());
- that.register_send_verifier(v.toString(16));
- }
- else if(response.error)
- {
- that.error_message(response.error);
- }
- };
- // Send the verifier to the server
- SRP.prototype.register_send_verifier = function(v)
- {
- var params = "v="+v;
- var auth_url = that.geturl() + that.paths("register/user/");
- that.ajaxRequest(auth_url, params, that.registered_user);
- };
-
- // The user has been registered successfully, now login
- SRP.prototype.registered_user = function(response)
- {
- if(response.ok)
- {
- that.identify();
- }
- };
-};
-SRP_REGISTER();