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

33 lines
775 B
JavaScript
Raw Normal View History

2020-01-15 22:12:02 +01:00
// Generated by CoffeeScript 1.12.7
(function() {
2019-03-19 05:56:36 +01:00
var _krbJsAlreadySent;
if (_krbJsAlreadySent === null) {
_krbJsAlreadySent = false;
}
$(document).ready(function() {
2019-03-19 05:56:36 +01:00
if (!_krbJsAlreadySent) {
_krbJsAlreadySent = 1;
console.log('Send Kerberos Ajax request');
return $.ajax(portal + '?kerberos=1', {
dataType: 'json',
statusCode: {
401: function() {
return $('#lformKerberos').submit();
}
},
success: function(data) {
return $('#lformKerberos').submit();
},
error: function() {
return $('#lformKerberos').submit();
}
2019-03-19 05:56:36 +01:00
});
} else {
return console.log('Kerberos Ajax request already sent');
}
});
}).call(this);