From ab6c6980f26eea18ccda45a15dc08c84fe276a6c Mon Sep 17 00:00:00 2001 From: Markus Krogh Date: Wed, 4 Oct 2017 13:51:21 +0200 Subject: Adding logout view, that is not as bad looking --- idp/templates/views/logout.vm | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 idp/templates/views/logout.vm 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() ) + + #end +
+ #if ( $logoutContext and !$logoutContext.getSessionMap().isEmpty() ) +

#springMessageText("idp.logout.ask", "Would you like to attempt to log out of all services accessed during your session? Please select Yes or No to ensure the logout operation completes, or wait a few seconds for Yes.")

+
+ +
+ + +
+ +
+

#springMessageText("idp.logout.contactServices", "If you proceed, the system will attempt to contact the following services:")

+
    + #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()) +
  1. $encoder.encodeForHTML($rpUIContext.getServiceName())
  2. + #else +
  3. $encoder.encodeForHTML($sp)
  4. + #end + #end +
+ #else +

#springMessageText("idp.logout.complete", "The logout operation is complete, and no other services appear to have been accessed during this session.")

+ + + #end +

Even though you are logged out here, you might still have sessions in other services that are still valid.

+
+#end -- cgit v1.1