From fa6301c87342727d68228037709e3fdc69cbe800 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Fri, 11 Dec 2015 13:29:56 +0100 Subject: [PATCH] Add an optional callback to javascript cas login function --- cas_server/static/cas_server/cas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cas_server/static/cas_server/cas.js b/cas_server/static/cas_server/cas.js index 6b1159c..4c42dde 100644 --- a/cas_server/static/cas_server/cas.js +++ b/cas_server/static/cas_server/cas.js @@ -1,4 +1,4 @@ -function cas_login(cas_server_login, service, login_service){ +function cas_login(cas_server_login, service, login_service, callback){ url = cas_server_login + '?service=' + encodeURIComponent(service); $.ajax({ type: 'GET', @@ -17,6 +17,8 @@ function cas_login(cas_server_login, service, login_service){ xhrFields: { withCredentials: true }, + success: callback, + error: function (request, textStatus, errorThrown) {}, }); } else { if(data.detail == "login required"){