From 3efb9cfe36218a85971c6c84811e10371860f4b8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 17 Sep 2014 01:15:27 +0000 Subject: auth call now uses typed in password diff --git a/index.html b/index.html index 8ebe537..a07f16d 100644 --- a/index.html +++ b/index.html @@ -10,9 +10,20 @@ alert("username: " + data.username + "\ntoken: " + data.token ); } + function authError(req, status, error) { + alert(status + ": '" + error + "'") + } + function auth() { - $.get("/authtoken.json", authSuccess, "json"); + $.ajax("/authtoken.json", + { cache: false, + username: $("#username").val(), + password: $("#password").val(), + dataType: "json", + error: authError, + success: authSuccess + }); } $("#loginform").submit(function(event) { -- cgit v0.10.2