From 6caf581e26c989ec5e2154aa60d6526ff956e381 Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 14 Oct 2012 15:30:51 +0200 Subject: got SRP v6a test setup and basic rest flow to work * still need to fix the algo for auth * Also need to get the http verbs right --- src/jqueryRest.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/jqueryRest.js') diff --git a/src/jqueryRest.js b/src/jqueryRest.js index a618e87..64c8080 100644 --- a/src/jqueryRest.js +++ b/src/jqueryRest.js @@ -68,16 +68,13 @@ jqueryRest = function() { }, callback); } - function handshake(I, Astr, callback) { - ajaxRequest("handshake/", "I="+I+"&A="+Astr, callback); + function handshake(session, callback) { + ajaxRequest("sessions", { login: session.getI(), + A: session.getAstr()}, callback); } - function authenticate(M, callback) { - ajaxRequest("authenticate/", "M="+M, callback); - } - - function upgrade(M, callback) { - ajaxRequest("upgrade/authenticate/", "M="+M, callback); + function authenticate(session, callback) { + ajaxRequest("sessions/" + session.getI(), {client_auth: session.getM()}, callback); } return { @@ -85,7 +82,6 @@ jqueryRest = function() { register: register, register_send_verifier: sendVerifier, handshake: handshake, - authenticate: authenticate, - upgrade: upgrade + authenticate: authenticate }; }; -- cgit v1.2.3