summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2014-09-17 01:15:27 (GMT)
committerChristian Pointner <equinox@helsinki.at>2014-09-17 01:15:27 (GMT)
commit3efb9cfe36218a85971c6c84811e10371860f4b8 (patch)
treef7cc90e6a3cad7f2400b264a693e5efc732aaef2 /index.html
parent83335d60815eb622e82edec9f9c042b036af0b55 (diff)
auth call now uses typed in password
Diffstat (limited to 'index.html')
-rw-r--r--index.html13
1 files changed, 12 insertions, 1 deletions
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) {