diff options
author | Markus Krogh <markus@nordu.net> | 2017-10-04 13:51:21 +0200 |
---|---|---|
committer | Markus Krogh <markus@nordu.net> | 2017-10-04 13:51:21 +0200 |
commit | ab6c6980f26eea18ccda45a15dc08c84fe276a6c (patch) | |
tree | 75cc395be68c173f499fc88e6d5a9bbc0388c449 /idp | |
parent | 400a77834fef117be0e8658183f4467e04c38c2d (diff) |
Adding logout view, that is not as bad looking
Diffstat (limited to 'idp')
-rw-r--r-- | idp/templates/views/logout.vm | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/idp/templates/views/logout.vm b/idp/templates/views/logout.vm new file mode 100644 index 0000000..61bde54 --- /dev/null +++ b/idp/templates/views/logout.vm @@ -0,0 +1,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 |