summaryrefslogtreecommitdiff
path: root/idp/templates/views/logout.vm
blob: 61bde549c579b732fafc2a87c69b628ef164b38a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
##
## Velocity Template for logout flow's starting view-state
##
## Velocity context will contain the following properties
## flowExecutionUrl - the form action location
## flowRequestContext - the Spring Web Flow RequestContext
## flowExecutionKey - the SWF execution key (this is built into the flowExecutionUrl)
## profileRequestContext - root of context tree
## logoutContext - context with SPSession details for logout operation
## multiRPContext - context with RelyingPartyContexts and possibly SP UI information from the metadata
## encoder - HTMLEncoder class
## request - HttpServletRequest
## response - HttpServletResponse
## environment - Spring Environment object for property resolution
## custom - arbitrary object injected by deployer
##

#parse("layout.vm")

#@layout()
        #if ( $logoutContext and !$logoutContext.getSessionMap().isEmpty() )
            <meta http-equiv="refresh" content="10;url=$flowExecutionUrl&_eventId=propagate">
        #end
          <div class="column one">
            #if ( $logoutContext and !$logoutContext.getSessionMap().isEmpty() )
                <p>#springMessageText("idp.logout.ask", "Would you like to attempt to log out of all services accessed during your session? Please select <strong>Yes</strong> or <strong>No</strong> to ensure the logout operation completes, or wait a few seconds for Yes.")</p>
                <br>

                <form id="propagate_form" method="POST" action="$flowExecutionUrl">
                    <button id="propagate_yes" type="submit" name="_eventId" value="propagate">Yes</button>
                    <button id="propagate_no" type="submit" name="_eventId" value="end">No</button>
                </form>

                <br>
                <p>#springMessageText("idp.logout.contactServices", "If you proceed, the system will attempt to contact the following services:")</p>
                <ol>
                #foreach ($sp in $logoutContext.getSessionMap().keySet())
                    #set ($rpCtx = $multiRPContext.getRelyingPartyContextById($sp))
                    #if ($rpCtx)
                      #set ($rpUIContext = $rpCtx.getSubcontext("net.shibboleth.idp.ui.context.RelyingPartyUIContext"))
                    #end
                    #if ($rpUIContext and $rpUIContext.getServiceName())
                      <li>$encoder.encodeForHTML($rpUIContext.getServiceName())</li>
                    #else
                      <li>$encoder.encodeForHTML($sp)</li>
                    #end
                #end
                </ol>
            #else
                <p><strong>#springMessageText("idp.logout.complete", "The logout operation is complete, and no other services appear to have been accessed during this session.")</strong></p>
                <!-- Complete the flow by adding a hidden iframe. -->
                <iframe style="display:none" src="$flowExecutionUrl&_eventId=proceed"></iframe>
            #end
            <p>Even though you are logged out here, you might still have sessions in other services that are still valid.</p>
          </div>
#end