lemonldap-ng/lemonldap-ng-portal/site/htdocs/static/common/js/kerberos.js

25 lines
644 B
JavaScript
Raw Normal View History

2020-01-15 22:12:02 +01:00
// Generated by CoffeeScript 1.12.7
2017-04-06 22:37:36 +02:00
(function() {
$(document).ready(function() {
return $.ajax((window.location.href.match(/\/upgradesession/) ? window.location.href : portal) + '?kerberos=1', {
2017-04-06 22:37:36 +02:00
dataType: 'json',
statusCode: {
401: function() {
2017-04-06 22:37:38 +02:00
return $('#lform').submit();
2017-04-06 22:37:36 +02:00
}
},
success: function(data) {
if (window.location.href.match(/\/upgradesession/)) {
return document.location = portal;
} else {
return $('#lform').submit();
}
2017-04-06 22:37:36 +02:00
},
error: function() {
2017-04-06 22:37:38 +02:00
return $('#lform').submit();
2017-04-06 22:37:36 +02:00
}
});
});
}).call(this);