lemonldap-ng/lemonldap-ng-portal/site/coffee/kerberos.coffee
Maudoux Christophe 6e27659c51 Revert "Update doc"
This reverts commit b77d45eca9
2018-03-12 16:45:22 +01:00

19 lines
486 B
CoffeeScript

# Launch Kerberos request
$(document).ready ->
$.ajax portal + '?kerberos=1',
dataType: 'json'
# Called if browser can't find Kerberos ticket, will display
# PE_BADCREDENTIALS
statusCode:
401: () ->
$('#lform').submit()
# If request succeed cookie is set, posting form to get redirection
# or menu
success: (data) ->
$('#lform').submit()
# Case else, will display PE_BADCREDENTIALS or fallback to next auth
# backend
error: () ->
$('#lform').submit()