log page url in logout console log of iframe_count
This commit is contained in:
parent
08f61f9dbb
commit
bb9bcf88ad
|
@ -66,7 +66,7 @@ class AuthSAML2Backend:
|
|||
code = '<div>'
|
||||
code += _('Sending logout to %(pid)s....') % { 'pid': name or provider_id }
|
||||
code += '''<iframe src="%s?provider_id=%s" marginwidth="0" marginheight="0" \
|
||||
scrolling="no" style="border: none" width="16" height="16" onload="window.iframe_count -= 1; console.log('decrement iframe_count');"></iframe></div>''' \
|
||||
scrolling="no" style="border: none" width="16" height="16" onload="window.iframe_count -= 1; console.log(windows.location.href + ' decrement iframe_count');"></iframe></div>''' \
|
||||
% (reverse(saml2_endpoints.sp_slo,
|
||||
args=[provider_id]), provider_id)
|
||||
return [ code ]
|
||||
|
|
|
@ -65,7 +65,7 @@ class SamlBackend(object):
|
|||
code = '<div>'
|
||||
code += _('Sending logout to %(name)s....') % { 'name': name or provider_id}
|
||||
code += '''<iframe src="%s?provider_id=%s" marginwidth="0" marginheight="0" \
|
||||
scrolling="no" style="border: none" width="16" height="16" onload="window.iframe_count -= 1;console.log('decrement iframe_count');"></iframe></div>''' % \
|
||||
scrolling="no" style="border: none" width="16" height="16" onload="window.iframe_count -= 1;console.log(windows.location.href + ' decrement iframe_count');"></iframe></div>''' % \
|
||||
(reverse(saml2_endpoints.idp_slo, args=[provider_id]), provider_id)
|
||||
logger.debug("logout_list: code %r" % code)
|
||||
result.append(code)
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
|
||||
<script>
|
||||
window.iframe_count += document.getElementsByTagName("iframe").length;
|
||||
console.log('logout iframe count: ' + window.iframe_count);
|
||||
console.log(window.location.href + ' logout iframe count: ' + window.iframe_count);
|
||||
setInterval(function () {
|
||||
console.log('logout check iframe count: ' + window.iframe_count);
|
||||
console.log(window.location.href + ' logout check iframe count: ' + window.iframe_count);
|
||||
if (iframe_count == 0) {
|
||||
window.location = '{{ next_page }}';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue