2017-04-06 22:37:36 +02:00
|
|
|
# Launch Kerberos request
|
|
|
|
|
|
|
|
$(document).ready ->
|
2019-11-15 16:10:37 +01:00
|
|
|
$.ajax (if window.location.href.match /\/upgradesession/ then window.location.href else portal )+ '?kerberos=1',
|
2017-04-06 22:37:36 +02:00
|
|
|
dataType: 'json'
|
2017-10-10 17:23:41 +02:00
|
|
|
# Called if browser can't find Kerberos ticket, will display
|
2017-04-06 22:37:36 +02:00
|
|
|
# PE_BADCREDENTIALS
|
|
|
|
statusCode:
|
|
|
|
401: () ->
|
2017-04-06 22:37:38 +02:00
|
|
|
$('#lform').submit()
|
2017-10-10 17:23:41 +02:00
|
|
|
# If request succeed cookie is set, posting form to get redirection
|
2017-04-06 22:37:36 +02:00
|
|
|
# or menu
|
|
|
|
success: (data) ->
|
2019-11-15 16:10:37 +01:00
|
|
|
if window.location.href.match /\/upgradesession/
|
|
|
|
document.location = portal
|
|
|
|
else
|
|
|
|
$('#lform').submit()
|
2017-04-06 22:37:36 +02:00
|
|
|
# Case else, will display PE_BADCREDENTIALS or fallback to next auth
|
|
|
|
# backend
|
|
|
|
error: () ->
|
2017-04-06 22:37:38 +02:00
|
|
|
$('#lform').submit()
|