portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r910835 - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/ applications/jetspeed/src/main/webapp/WEB-INF/pages/ applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/ components/jetspeed-p...
Date Wed, 17 Feb 2010 06:05:55 GMT
Author: rwatler
Date: Wed Feb 17 06:05:55 2010
New Revision: 910835

URL: http://svn.apache.org/viewvc?rev=910835&view=rev
Log:
JS2-1101: OpenID Support: add PortalReservedParameter.SESSION_OPEN_ID_PROVIDER session attribute
to expose current OpenID provider to portlets indicating a valid portal login for a domain

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/default-page.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-page.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/web.xml
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/PortalReservedParameters.java

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/default-page.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/default-page.psml?rev=910835&r1=910834&r2=910835&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/default-page.psml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_template/new-user/default-page.psml
Wed Feb 17 06:05:55 2010
@@ -38,6 +38,32 @@
       <property layout="TwoColumns" name="row" value="1" />
       <property layout="TwoColumns" name="column" value="1" />
     </fragment>
+    <fragment id="uhtemp-1013-openid" type="portlet" name="j2-admin::OpenIDLoginPortlet">
+      <property layout="TwoColumns" name="row" value="2" />
+      <property layout="TwoColumns" name="column" value="1" />
+      <preference name="providerLabels" readOnly="false">
+        <value>Hippo</value>
+      </preference>
+      <preference name="providerDomains" readOnly="false">
+        <value>1hippo.com</value>
+      </preference>
+      <preference name="enableOpenIDEntry" readOnly="false">
+        <value>false</value>
+      </preference>
+    </fragment>                                
+    <fragment id="uhtemp-1014-openid" type="portlet" name="j2-admin::OpenIDIFramePortlet">
+      <property layout="TwoColumns" name="row" value="3" />
+      <property layout="TwoColumns" name="column" value="1" />
+      <preference name="SRC">
+        <value>https://docs.google.com/a/1hippo.com/Doc?docid=0Adkmj1bZDnN5ZGM2aDUyNmdfMzNndjdkanNnNA&amp;hl=en</value>
+      </preference>
+      <preference name="REQUIREDOPENIDPROVIDERLABEL">
+        <value>Hippo</value>
+      </preference>
+      <preference name="REQUIREDOPENIDPROVIDER">
+        <value>1hippo.com</value>
+      </preference>
+    </fragment>
     
   </fragment>
 

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-page.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-page.psml?rev=910835&r1=910834&r2=910835&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-page.psml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/default-page.psml
Wed Feb 17 06:05:55 2010
@@ -49,6 +49,32 @@
         <property name="row" value="4"/>
         <property name="column" value="1"/>
     </fragment-reference>       
+    <fragment id="dp-12-openid" type="portlet" name="j2-admin::OpenIDLoginPortlet">
+      <property layout="TwoColumns" name="row" value="5" />
+      <property layout="TwoColumns" name="column" value="1" />
+      <preference name="providerLabels" readOnly="false">
+        <value>Hippo</value>
+      </preference>
+      <preference name="providerDomains" readOnly="false">
+        <value>1hippo.com</value>
+      </preference>
+      <preference name="enableOpenIDEntry" readOnly="false">
+        <value>false</value>
+      </preference>
+    </fragment>                                
+    <fragment id="dp-10-openid" type="portlet" name="j2-admin::OpenIDIFramePortlet">
+      <property layout="TwoColumns" name="row" value="6" />
+      <property layout="TwoColumns" name="column" value="1" />
+      <preference name="SRC">
+        <value>https://docs.google.com/a/1hippo.com/Doc?docid=0Adkmj1bZDnN5ZGM2aDUyNmdfMzNndjdkanNnNA&amp;hl=en</value>
+      </preference>
+      <preference name="REQUIREDOPENIDPROVIDERLABEL">
+        <value>Hippo</value>
+      </preference>
+      <preference name="REQUIREDOPENIDPROVIDER">
+        <value>1hippo.com</value>
+      </preference>
+    </fragment>
     <fragment id="dp-7" type="portlet" name="demo::PickANumberPortlet" >
       <property layout="TwoColumns" name="row" value="0" />
       <property layout="TwoColumns" name="column" value="0" />

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/web.xml?rev=910835&r1=910834&r2=910835&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/web.xml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/web.xml
Wed Feb 17 06:05:55 2010
@@ -49,12 +49,10 @@
     <filter-class>org.apache.jetspeed.login.filter.PortalFilter</filter-class>
  
   </filter>
   -->
-  <!--  
   <filter>
     <filter-name>OpenIDPortalFilter</filter-name>
     <filter-class>org.apache.jetspeed.openid.filter.OpenIDPortalFilter</filter-class>
   </filter>
-  -->
 
   <filter-mapping>
     <filter-name>XXSUrlAttackFilter</filter-name>
@@ -71,12 +69,10 @@
     <url-pattern>/*</url-pattern>    
   </filter-mapping>  
   -->
-  <!--
   <filter-mapping>
     <filter-name>OpenIDPortalFilter</filter-name>
     <url-pattern>/*</url-pattern>
   </filter-mapping>
-  -->
 
   <listener>
     <listener-class>org.apache.jetspeed.engine.JetspeedServlet</listener-class>
@@ -164,7 +160,6 @@
   </servlet>
 
   <!-- OpenID Relaying Party Servlet -->
-  <!--
   <servlet>
     <description>
       OpenID Relaying Party, (RP), servlet used to return discovery
@@ -175,9 +170,19 @@
     <servlet-name>OpenIDRelayingPartyServlet</servlet-name>
     <servlet-class>org.apache.jetspeed.openid.OpenIDRelayingPartyServlet</servlet-class>
     <init-param>
+      <description>Discovery domain to consumer implementation mapping.</description>
+      <param-name>consumer.1hippo.com</param-name>
+      <param-value>step2</param-value>
+    </init-param>
+    <init-param>
       <description>Discovery domain to provider URL/host mapping.</description>
-      <param-name>discovery.gmail.com</param-name>
-      <param-value>https://www.google.com/accounts/o8/id</param-value>
+      <param-name>discovery.onehippo.com</param-name>
+      <param-value>1hippo.com</param-value>
+    </init-param>
+    <init-param>
+      <description>Discovery domain to consumer implementation mapping.</description>
+      <param-name>consumer.onehippo.com</param-name>
+      <param-value>step2</param-value>
     </init-param>
     <init-param>
       <description>Enable servlet init parameter registration configuration.</description>
@@ -221,7 +226,6 @@
     </init-param>
     <load-on-startup>2</load-on-startup>
   </servlet>
-  -->
 
   <servlet-mapping>
       <servlet-name>DiagnosticsServlet</servlet-name>
@@ -322,13 +326,11 @@
   </servlet-mapping>
 
   <!-- OpenID Relaying Party Servlet -->
-  <!--
   <servlet-mapping>
     <servlet-name>OpenIDRelayingPartyServlet</servlet-name>
     <url-pattern>/openid</url-pattern>
     <url-pattern>/openid/*</url-pattern>
   </servlet-mapping>
-  -->
 
   <!-- The Usual Welcome File List -->
   <welcome-file-list>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java?rev=910835&r1=910834&r2=910835&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/openid/OpenIDRelayingPartyServlet.java
Wed Feb 17 06:05:55 2010
@@ -75,7 +75,6 @@
 import com.google.step2.discovery.SecureUrlIdentifier;
 import com.google.step2.discovery.XrdDiscoveryResolver;
 import com.google.step2.http.DefaultHttpFetcher;
-import com.google.step2.http.HttpFetcher;
 import com.google.step2.xmlsimplesign.CachedCertPathValidator;
 import com.google.step2.xmlsimplesign.CertValidator;
 import com.google.step2.xmlsimplesign.DefaultCertValidator;
@@ -728,6 +727,7 @@
                         portalUserContentCacheManager.evictUserContentCache(portalUser.getName(),
request.getSession().getId());
                     }                         
                     // configure portal session with logged in session
+                    request.getSession().setAttribute(PortalReservedParameters.SESSION_OPEN_ID_PROVIDER,
provider);
                     request.getSession().setAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT,
subject);
 
                     // log/audit portal user login

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/PortalReservedParameters.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/PortalReservedParameters.java?rev=910835&r1=910834&r2=910835&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/PortalReservedParameters.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/PortalReservedParameters.java
Wed Feb 17 06:05:55 2010
@@ -45,6 +45,7 @@
     public static final String PAGE_ATTRIBUTE = "org.apache.jetspeed.Page";
     public static final String PAGE_EDIT_ACCESS_ATTRIBUTE = "org.apache.jetspeed.decoration.PageEditAccess";
     public static final String SESSION_KEY_SUBJECT = "org.apache.jetspeed.security.subject";
+    public static final String SESSION_OPEN_ID_PROVIDER = "org.apache.jetspeed.security.openid.provider";
     public static final String REQUEST_CONTEXT_ATTRIBUTE = "org.apache.jetspeed.request.RequestContext";
     public static final String REQUEST_DIAGNOSTICS_ATTRIBUTE = "org.apache.jetspeed.request.RequestDiagnostics";
     public static final String REQUEST_CONTEXT_OBJECTS = "org.apache.jetspeed.request.RequestContextObjects";



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message