Commit 5210a8ed authored by Yadd's avatar Yadd

Add Krb JS (#707)

parent 73194ef2
......@@ -83,6 +83,7 @@ sub extractFormInfo {
# Case 3: Display kerberos auth page (with javascript)
else {
$self->logger->debug('Send Kerberos javascript');
$self->p->setHiddenValue( $req, kerberos => 0, '', 0 );
$req->datas->{customScript} .=
'<script type="text/javascript" src="'
. $self->p->staticPrefix
......
# Launch Kerberos request
$(document).ready ->
$.ajax
dataType: 'json'
# Called if browser can't find Kerberos ticket will display
# PE_BADCREDENTIALS
statusCode:
401: () ->
$('#form').submit()
# If request succeed, cookie is set, posting form to get redirection
# or menu
success: (data) ->
$('#form').submit()
# Case else, will display PE_BADCREDENTIALS or fallback to next auth
# backend
error: () ->
$('#form').submit()
// Generated by CoffeeScript 1.10.0
(function() {
$(document).ready(function() {
return $.ajax({
dataType: 'json',
statusCode: {
401: function() {
return $('#form').submit();
}
},
success: function(data) {
return $('#form').submit();
},
error: function() {
return $('#form').submit();
}
});
});
}).call(this);
(function(){$(document).ready(function(){return $.ajax({dataType:"json",statusCode:{401:function(){return $("#form").submit()}},success:function(a){return $("#form").submit()},error:function(){return $("#form").submit()}})})}).call(this);
\ No newline at end of file
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