summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-10-14 16:24:10 +0200
committerAzul <azul@riseup.net>2012-10-14 16:24:10 +0200
commit2263abad65b92ef26c8e67097bbcfeb6988ab8fd (patch)
treef01c8721ddabfaadeef9e1a6490b761ffb5b4709 /spec
parent6caf581e26c989ec5e2154aa60d6526ff956e381 (diff)
calculating the right M and M2!
still missing some error handling, this in Django specs and the right http verbs
Diffstat (limited to 'spec')
-rw-r--r--spec/restful/login.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/restful/login.js b/spec/restful/login.js
index 8da6cfd..3bf9dda 100644
--- a/spec/restful/login.js
+++ b/spec/restful/login.js
@@ -16,6 +16,7 @@ describe("Login", function() {
var b = '6aa5c88d1877af9907ccefad31083e1102a7121dc04706f681f66c8680fb7f05';
var B = 'd56a80aaafdf9f70598b5d1184f122f326a333fafd37ab76d6f7fba4a9c4ee59545be056335150bd64f04880bc8e76949469379fe9de17cf6f36f3ee11713d05f63050486bc73c545163169999ff01b55c0ca4e90d8856a6e3d3a6ffc70b70d993a5308a37a5c2399874344e083e72b3c9afa083d312dfe9096ea9a65023f135';
var salt = '628365a0';
+ var K = 'db6ec0bdab81742315861a828323ff492721bdcd114077a4124bc425e4bf328b';
var M = '640e51d5ac5461591c31811221261f0e0eae7c08ce43c85e9556adbd94ed8c26';
var M2 = '49e48f8ac8c4da0e8a7374f73eeedbee2266e123d23fc1be1568523fc9c24b1e';
var A_, callback;
@@ -38,6 +39,11 @@ describe("Login", function() {
expect(A_).toBe(A);
});
+ it("calculates the right key", function(){
+ this.srp.session.calculations(salt, B);
+ expect(this.srp.session.key()).toBe(K);
+ });
+
it("works with JSON responses", function(){
this.srp.identify();
@@ -63,4 +69,3 @@ describe("Login", function() {
});
-