You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/03/12 16:12:19 UTC

cxf-fediz git commit: [FEDIZ-96] - Revised fix

Repository: cxf-fediz
Updated Branches:
  refs/heads/master ce7c9a789 -> beaa1ac70


[FEDIZ-96] - Revised fix


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/beaa1ac7
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/beaa1ac7
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/beaa1ac7

Branch: refs/heads/master
Commit: beaa1ac70ffabeeb1fab768f3f7a799498a2fc10
Parents: ce7c9a7
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Mar 12 15:12:04 2015 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Mar 12 15:12:04 2015 +0000

----------------------------------------------------------------------
 .../WEB-INF/signoutconfirmationresponse.jsp     | 44 ++++++++++------
 .../src/main/webapp/WEB-INF/signoutresponse.jsp | 54 +++++++++++---------
 2 files changed, 56 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/beaa1ac7/services/idp/src/main/webapp/WEB-INF/signoutconfirmationresponse.jsp
----------------------------------------------------------------------
diff --git a/services/idp/src/main/webapp/WEB-INF/signoutconfirmationresponse.jsp b/services/idp/src/main/webapp/WEB-INF/signoutconfirmationresponse.jsp
index 7747382..cc9479a 100644
--- a/services/idp/src/main/webapp/WEB-INF/signoutconfirmationresponse.jsp
+++ b/services/idp/src/main/webapp/WEB-INF/signoutconfirmationresponse.jsp
@@ -1,5 +1,4 @@
 <%@ page import="java.util.Map" %>
-<%@ page import="org.apache.cxf.fediz.service.idp.domain.Idp" %>
 <%@ page import="org.apache.cxf.fediz.service.idp.beans.SigninParametersCacheAction" %>
 <%@ page import="org.apache.cxf.fediz.core.FederationConstants" %>
 <%@ page import="java.util.List" %>
@@ -12,35 +11,46 @@
 <title>IDP SignOut Confirmation Response Page</title>
 </head>
 <body>
-	<h1>Logout from the following realms?</h1>
+    <%
+        @SuppressWarnings("unchecked")
+        Map<String, String> rum =
+                (Map<String, String>) request.getSession().getAttribute(SigninParametersCacheAction.REALM_URL_MAP);
 
-    <p>
-        <%
-            final Idp idpConfig = (Idp) request.getAttribute(SigninParametersCacheAction.IDP_CONFIG);
-
-            @SuppressWarnings("unchecked")
-            Map<String, String> rum =
-                    (Map<String, String>) request.getSession().getAttribute(SigninParametersCacheAction.REALM_URL_MAP);
-            
+        if (rum == null) {
+    %>
+	        <p>You have already logged out</p>
+    <%
+        } else {
+    %>
+	        <h1>Logout from the following realms?</h1>
+	   
+    <%
             Iterator<Map.Entry<String, String>> iterator = rum.entrySet().iterator();
-            
+                
             while (iterator.hasNext()) {
                 Map.Entry<String, String> next = iterator.next();
                 String rpUri = next.getValue();
                 if (rpUri != null) {
-        %>
-        Will logout on RP: <%= rpUri%>
-        <br/>
-        <%
+    %>
+                    <p>
+                    Will logout on RP: <%= rpUri%>
+                    </p>
+                    <br/>
+    <%
                 }
             }
-        %>
+        }
+        
+        if (rum != null && !rum.isEmpty()) {
+    %>
         <form:form method="POST" id="signoutconfirmationresponseform" name="signoutconfirmationresponseform">
             <input type="hidden" name="wa" value="wsignout1.0" />
             <input type="hidden" id="execution" name="execution" value="${flowExecutionKey}" />
             <input type="submit" name="_eventId_submit" value="Logout" />
             <input type="submit" name="_eventId_cancel" value="Cancel" />
         </form:form>
-    </p>
+    <%     
+        }
+    %>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/beaa1ac7/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp
----------------------------------------------------------------------
diff --git a/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp b/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp
index c06fe85..71110bf 100644
--- a/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp
+++ b/services/idp/src/main/webapp/WEB-INF/signoutresponse.jsp
@@ -11,34 +11,38 @@
 <title>IDP SignOut Response Page</title>
 </head>
 <body>
-	<h1>CXF Fediz IDP successful logout.</h1>
+    <%
+        @SuppressWarnings("unchecked")
+        Map<String, String> rum =
+                (Map<String, String>) request.getAttribute(SigninParametersCacheAction.REALM_URL_MAP);
 
-    <p>
-        <%
-            @SuppressWarnings("unchecked")
-            Map<String, String> rum =
-                    (Map<String, String>) request.getAttribute(SigninParametersCacheAction.REALM_URL_MAP);
-
-            if (rum == null) {
-        %>
-        <p>You have already logged out</p>
-        <%
-            } else {
-                Iterator<Map.Entry<String, String>> iterator = rum.entrySet().iterator();
+        if (rum == null) {
+    %>
+	        <p>You have already logged out</p>
+    <%
+        } else {
+    %>
+            <h1>CXF Fediz IDP successful logout.</h1>
+        
+            <p>
+    <%
+            Iterator<Map.Entry<String, String>> iterator = rum.entrySet().iterator();
             
-                while (iterator.hasNext()) {
-                    Map.Entry<String, String> next = iterator.next();
-                    String rpUri = next.getValue();
-                    if (rpUri != null) {
-        %>
-        Logout status of RP <%= rpUri%>:
-        <img src="<%=rpUri + "?" + FederationConstants.PARAM_ACTION + "=" + FederationConstants.ACTION_SIGNOUT_CLEANUP %>"/>
-        <br/>
-        <%
-                    }
+            while (iterator.hasNext()) {
+                Map.Entry<String, String> next = iterator.next();
+                String rpUri = next.getValue();
+                if (rpUri != null) {
+    %>
+                    Logout status of RP <%= rpUri%>:
+                    <img src="<%=rpUri + "?" + FederationConstants.PARAM_ACTION + "=" + FederationConstants.ACTION_SIGNOUT_CLEANUP %>"/>
+                    <br/>
+    <%
                 }
             }
-        %>
-    </p>
+    %>
+	        </p>
+    <%
+        }
+    %>
 </body>
 </html>