cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf-fediz git commit: IdP fix for incorrect view
Date Fri, 04 Sep 2015 11:11:20 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master a0bc9f6bc -> 11e4fdc18


IdP fix for incorrect view


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

Branch: refs/heads/master
Commit: 11e4fdc18fc5e62992ba82ccb36bb9da2380df65
Parents: a0bc9f6
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Sep 4 12:08:49 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Sep 4 12:08:49 2015 +0100

----------------------------------------------------------------------
 .../apache/cxf/fediz/service/idp/model/IDPConfig.java |  9 +++++++--
 .../idp/src/main/webapp/WEB-INF/idp-config-realma.xml |  2 +-
 .../idp/src/main/webapp/WEB-INF/views/idplist.jsp     | 14 +++++++-------
 services/idp/src/test/resources/idp-config.xml        |  2 +-
 4 files changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/11e4fdc1/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
----------------------------------------------------------------------
diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
index 40c93c0..9b9c5cd 100644
--- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
+++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/model/IDPConfig.java
@@ -33,7 +33,12 @@ public class IDPConfig extends Idp {
         this.applications = new ArrayList<>(applications.values());
     }
     
-    public void setTrustedIDPs(Map<String, TrustedIDPConfig> trustedIDPs) {
-        this.trustedIdpList = new ArrayList<TrustedIdp>(trustedIDPs.values());
+    public void setTrustedIdps(Map<String, TrustedIDPConfig> trustedIdps) {
+        this.trustedIdpList = new ArrayList<TrustedIdp>(trustedIdps.values());
+    }
+    
+    @Deprecated
+    public void setTrustedIDPs(Map<String, TrustedIDPConfig> trustedIdps) {
+        setTrustedIdps(trustedIdps);
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/11e4fdc1/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml
----------------------------------------------------------------------
diff --git a/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml b/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml
index 07c9a44..f6b703d 100644
--- a/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml
+++ b/services/idp/src/main/webapp/WEB-INF/idp-config-realma.xml
@@ -83,7 +83,7 @@
                        value="federation/clientcert" />
             </util:map>
         </property>
-        <property name="trustedIDPs">
+        <property name="trustedIdps">
             <util:map>
                 <entry key="urn:org:apache:cxf:fediz:idp:realm-B"
                     value-ref="trusted-idp-realmB" />

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/11e4fdc1/services/idp/src/main/webapp/WEB-INF/views/idplist.jsp
----------------------------------------------------------------------
diff --git a/services/idp/src/main/webapp/WEB-INF/views/idplist.jsp b/services/idp/src/main/webapp/WEB-INF/views/idplist.jsp
index 13b68ef..a490a12 100644
--- a/services/idp/src/main/webapp/WEB-INF/views/idplist.jsp
+++ b/services/idp/src/main/webapp/WEB-INF/views/idplist.jsp
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<%@page import="java.util.Map"%>
-<%@page import="org.apache.cxf.fediz.service.idp.model.IDPConfig"%>
-<%@page import="org.apache.cxf.fediz.service.idp.model.TrustedIDPConfig"%>
+<%@page import="java.util.List"%>
+<%@page import="org.apache.cxf.fediz.service.idp.domain.Idp"%>
+<%@page import="org.apache.cxf.fediz.service.idp.domain.TrustedIdp"%>
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
 <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
 <html>
@@ -13,11 +13,11 @@
 	<i>Where are you from? Please, select one Identity Provider in the list which is able
to authenticate you. </i>
 	<form:form method="POST" id="idplist" name="idplist">
 		<br />
-        <% IDPConfig idpConfig = (IDPConfig)request.getAttribute("idpConfig");
-        Map<String, TrustedIDPConfig> trustedIDPs = idpConfig.getTrustedIDPs(); %>
+        <% Idp idp = (Idp)request.getAttribute("idpConfig");
+        List<TrustedIdp> trustedIDPs = idp.getTrustedIdps(); %>
       <select name="whr">
-        <option value="<%=idpConfig.getRealm()%>" selected="selected" ><%=idpConfig.getServiceDescription()%></option>
-        <% for (TrustedIDPConfig trustedIDP : trustedIDPs.values()) { %>
+        <option value="<%=idp.getRealm()%>" selected="selected" ><%=idp.getServiceDescription()%></option>
+        <% for (TrustedIdp trustedIDP : trustedIDPs) { %>
         <option value="<%=trustedIDP.getRealm()%>"><%=trustedIDP.getDescription()%></option>
         <% } %>
       </select>

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/11e4fdc1/services/idp/src/test/resources/idp-config.xml
----------------------------------------------------------------------
diff --git a/services/idp/src/test/resources/idp-config.xml b/services/idp/src/test/resources/idp-config.xml
index ce3f60b..26145b3 100644
--- a/services/idp/src/test/resources/idp-config.xml
+++ b/services/idp/src/test/resources/idp-config.xml
@@ -79,7 +79,7 @@
                 <entry key="default" value="/login/default" />
             </util:map>
         </property>
-        <property name="trustedIDPs">
+        <property name="trustedIdps">
             <util:map>
                 <entry key="urn:org:apache:cxf:fediz:idp:realm-B"
                     value-ref="trusted-idp-realmB" />


Mime
View raw message