From ebbfe3d77efddbe8f97fa82c171632ac4cfcf6da Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 27 Sep 2012 22:39:08 +0200 Subject: added in leap web users - one repo to rule them all --- users/test/integration/api/Readme.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 users/test/integration/api/Readme.md (limited to 'users/test/integration/api/Readme.md') diff --git a/users/test/integration/api/Readme.md b/users/test/integration/api/Readme.md new file mode 100644 index 0000000..3a91f3d --- /dev/null +++ b/users/test/integration/api/Readme.md @@ -0,0 +1,23 @@ +API tests +========== + + +Testing the restful api from a simple python client as that's what we'll be using. + +This test so far mostly demoes the API. We have no SRP calc in there. + +TODO: keep track of the cookies during login. The server uses the session to keep track of the random numbers A and B. + +The output of signup_and_login_wrong_password pretty well describes the SRP API: + +``` +POST: http://localhost:9292/users.json + {"user[password_salt]": "54321", "user[password_verifier]": "12345", "user[login]": "SWQ055"} + -> {"password_salt":"54321","login":"SWQ055"} +POST: http://localhost:9292/sessions + {"A": "12345", "login": "SWQ055"} + -> {"B":"1778367531e93a4c7713c76f67649f35a4211ebc520926ae8c3848cd66171651"} +PUT: http://localhost:9292/sessions/SWQ055 + {"M": "123ABC"} + -> {"field":"password","error":"wrong password"} +``` -- cgit v1.2.3