Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
34600ac3
Unverified
Commit
34600ac3
authored
5 years ago
by
Jaime Pérez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Support SLO even with javascript disabled / missing.
parent
b6653567
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/core/templates/logout-iframe-wrapper.twig
+1
-15
1 addition, 15 deletions
modules/core/templates/logout-iframe-wrapper.twig
modules/core/templates/logout-iframe.twig
+31
-7
31 additions, 7 deletions
modules/core/templates/logout-iframe.twig
with
32 additions
and
22 deletions
modules/core/templates/logout-iframe-wrapper.twig
+
1
−
15
View file @
34600ac3
{%
set
pagetitle
=
'{logout:progress}'
|
trans
%}
{%
extends
"base.twig"
%}
{%
block
content
%}
{# pretty arbitrary height, but should have enough safety margins for most cases #}
{%
set
iframeHeight
=
(
25
+
(
SPs
|
length
*
4
))
%}
<iframe
style=
"width:100%; height:
{{
iframeHeight
}}
em; border:0;"
src=
"logout-iframe.php?type=embed&id=
{{
auth_state
|
escape
(
'url'
)
}}
"
></iframe>
{%
for
assocId
,
sp
in
SPs
%}
{%
if
attribute
(
sp
,
'core:Logout-IFrame:State'
)
==
'inprogress'
%}
<iframe
style=
"width:0; height:0; border:0;"
src=
"
{{
attribute
(
sp
,
'core:Logout-IFrame:URL'
)
|
escape
(
'html'
)
}}
</iframe>
{%
endif
%}
{%
endfor
%}
{%
endblock
%}
{%
extends
"@core/logout-iframe.twig"
%}
This diff is collapsed.
Click to expand it.
modules/core/templates/logout-iframe.twig
+
31
−
7
View file @
34600ac3
...
...
@@ -4,6 +4,14 @@
{%
block
preload
%}
<link
rel=
"preload"
href=
"
{{
asset
(
'js/logout.js'
)
}}
"
as=
"script"
>
{%
-
if
type
!=
"init"
%}
{%
-
set
content
=
'2'
%}
{%
-
if
remaining_services
|
length
==
0
%}
{%
-
set
content
=
'0; url=logout-iframe-done.php?id='
~
auth_state
%}
{%
-
endif
%}
<meta
http-equiv=
"refresh"
content=
"
{{
content
}}
"
>
{%
endif
%}
{%
endblock
preload
%}
{%
block
content
%}
...
...
@@ -17,8 +25,11 @@
{%
-
if
remaining_services
%}
{%
-
set
failed
=
false
%}
{%
-
set
remaining
=
0
%}
{%
-
if
remaining_services
|
length
>
0
%}
<p>
{%
trans
%}
You are also logged in on these services:
{%
endtrans
%}
</p>
{%
-
endif
%}
<div
class=
"custom-restricted-width"
>
<ul
class=
"fa-ul"
>
{%
-
for
key
,
sp
in
remaining_services
%}
...
...
@@ -29,9 +40,13 @@
{%
-
set
icon
=
'check-circle'
%}
{%
-
elseif
sp
[
'status'
]
==
'failed'
%}
{%
-
set
icon
=
'exclamation-circle'
%}
{%
-
elseif
sp
[
'status'
]
==
'onhold'
or
sp
[
'status'
]
==
'inprogress '
%}
{%
-
set
failed
=
true
%}
{%
-
elseif
(
sp
[
'status'
]
==
'onhold'
or
sp
[
'status'
]
==
'inprogress'
)
%}
{%
-
set
remaining
=
remaining
+
1
%}
{%
-
endif
%}
{%
-
if
type
==
'nojs'
and
sp
[
'status'
]
==
'inprogress'
%}
{%
-
set
icon
=
icon
~
' fa-spin'
%}
{%
-
endif
%}
<li
id=
"sp-
{{
key
}}
"
data-id=
"
{{
key
}}
"
data-status=
"
{{
sp
[
'status'
]
}}
"
{#- #}
data-timeout=
"
{{
timeout
}}
"
>
...
...
@@ -47,7 +62,6 @@
{%
-
endif
%}
{%
-
else
%}
{%
-
if
sp
[
'status'
]
==
'failed'
%}
(
{%
trans
%}
logout is not supported
{%
endtrans
%}
)
{%
-
endif
%}
{%
-
endif
%}
...
...
@@ -57,25 +71,28 @@
</ul>
</div>
<br
/
>
<div
id=
"error-message"
{%
if
not
failed
%}
class=
"hidden"
{%
endif
%}
>
<br>
<div
id=
"error-message"
{%
if
not
failed
or
type
==
'init'
%}
class=
"hidden"
{%
endif
%}
>
<div
class=
"message-box error"
>
{%
trans
%}
Unable to log out of one or more services. To ensure that all your
{#- #}
sessions are closed, you are encouraged to
<i>
close your webbrowser
</i>
.
{%
endtrans
%}
</div>
</div>
<form
id=
"error-form"
action=
"logout-iframe-done.php"
{%
if
remaining
%}
class=
"hidden"
{%
endif
%}
>
<form
id=
"error-form"
action=
"logout-iframe-done.php"
{%
-
if
(
not
failed
or
type
==
'init'
)
and
remaining
%}
class=
"hidden"
{%
endif
%}
>
<input
type=
"hidden"
name=
"id"
value=
"
{{
auth_state
}}
"
>
<button
type=
"submit"
id=
"btn-continue"
name=
"ok"
class=
"pure-button pure-button-red"
>
{%
-
trans
%}
Continue
{%
endtrans
-
%}
</button>
</form>
<div
id=
"original-actions"
{%
if
remaining
==
0
%}
class=
"hidden"
{%
endif
%}
>
<div
id=
"original-actions"
{%
if
type
!=
'init'
%}
class=
"hidden"
{%
endif
%}
>
<p>
{%
trans
%}
Do you want to logout from all the services above?
{%
endtrans
%}
</p>
<div
class=
"pure-button-group two-elements"
>
<form
id=
"startform"
action=
"logout-iframe.php"
>
<input
type=
"hidden"
name=
"id"
value=
"
{{
auth_state
}}
"
>
<input
type=
"hidden"
name=
"type"
value=
"nojs"
id=
"logout-type-selector"
>
{# ?? #}
<noscript>
<input
type=
"hidden"
name=
"type"
value=
"nojs"
id=
"logout-type-selector"
>
</noscript>
<button
type=
"submit"
id=
"btn-all"
name=
"ok"
class=
"pure-button pure-button-red"
>
{%
-
trans
%}
Yes, all services
{%
endtrans
-
%}
</button>
...
...
@@ -90,6 +107,13 @@
</form>
</div>
</div>
{%
-
else
%}
<form
id=
"error-form"
action=
"logout-iframe-done.php"
>
<input
type=
"hidden"
name=
"id"
value=
"
{{
auth_state
}}
"
>
<button
type=
"submit"
id=
"btn-continue"
name=
"ok"
class=
"pure-button pure-button-red"
>
{%
-
trans
%}
Continue
{%
endtrans
-
%}
</button>
</form>
{%
endif
%}
{%
endblock
%}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment