Commit fa6301c8 authored by Valentin Samir's avatar Valentin Samir

Add an optional callback to javascript cas login function

parent 187da57b
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"){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment