diff options
author | Azul <azul@riseup.net> | 2012-10-17 12:06:37 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2012-10-17 12:06:37 +0200 |
commit | 5a0ceeb1ca0055719a9b8977a799362163955766 (patch) | |
tree | 797bf5fe2dab2fea3b9b0ddb4c6c04be6d33e2e9 /src/srp.js | |
parent | d21474a0290edab1c765741d484335d83f50be75 (diff) |
hand success and error messages to identify by default
also cleaned up some other parts that were not needed anymore
Diffstat (limited to 'src/srp.js')
-rw-r--r-- | src/srp.js | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -9,8 +9,10 @@ function SRP(remote, session) this.session = session; // Start the login process by identifying the user - this.identify = function() + this.identify = function(success, error) { + srp.success = success; + srp.error = error; remote.handshake(session, receive_salts); // Receive login salts from the server, start calculations @@ -64,18 +66,10 @@ function SRP(remote, session) }; // This function is called when authentication is successful. - // Developers can set this to other functions in specific implementations - // and change the functionality. + // It's a dummy. Please hand the real thing to the call to identify. this.success = function() { - var forward_url = document.getElementById("srp_forward").value; - if(forward_url.charAt(0) != "#") - window.location = forward_url; - else - { - window.location = forward_url; - alert("Login successful."); - } + alert("Login successful."); }; }; |