summaryrefslogtreecommitdiff
path: root/src/jqueryRest.js
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2012-10-14 15:30:51 +0200
committerAzul <azul@riseup.net>2012-10-14 15:30:51 +0200
commit6caf581e26c989ec5e2154aa60d6526ff956e381 (patch)
tree6d99640d129e2271340902c1fe479f1e851dfcbd /src/jqueryRest.js
parent1c0454cbb1c0b8d75a3c192ff588365ef8bc19d0 (diff)
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
Diffstat (limited to 'src/jqueryRest.js')
-rw-r--r--src/jqueryRest.js16
1 files changed, 6 insertions, 10 deletions
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
};
};