portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r770522 - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/pages/ components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/ jetspeed-api/src/main/java/org/apache/jetspeed/ jetspeed-portal-resources/src...
Date Fri, 01 May 2009 03:28:17 GMT
Author: taylor
Date: Fri May  1 03:28:15 2009
New Revision: 770522

URL: http://svn.apache.org/viewvc?rev=770522&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-671

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/p002.psml
    portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOManager.java
    portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
    portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/p002.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/p002.psml?rev=770522&r1=770521&r2=770522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/p002.psml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/p002.psml
Fri May  1 03:28:15 2009
@@ -30,7 +30,7 @@
 	<metadata name="title" xml:lang="zh-TW">第二個PSML頁面</metadata>
 	<fragment id="xx2.0" type="layout"
 		name="jetspeed-layouts::VelocityOneColumn">
-		<fragment id="xx2.3" type="portlet" name="demo::SSODemoHelp">
+		<fragment id="xx2.3" type="portlet" name="j2-admin::SSODemoHelp">
 			<property layout="OneColumn" name="row" value="0" />
 		</fragment>
 		<fragment id="xx2.4" type="layout"

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOManager.java?rev=770522&r1=770521&r2=770522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-sso/src/test/java/org/apache/jetspeed/sso/TestSSOManager.java
Fri May  1 03:28:15 2009
@@ -110,7 +110,8 @@
  
      
      */
-    public void testAddAndFetchSites() throws Exception {
+    public void testAddAndFetchSites() throws Exception
+    {
         addTestUser();
         addAnotherTestUser();
         addTestSite();
@@ -167,7 +168,8 @@
         
     }
     
-    public void testWildCardSiteSearch() throws Exception {
+    public void testWildCardSiteSearch() throws Exception 
+    {
 
         // test fetching sites with wildcard searches
         ssoManager.addSite(ssoManager.newSite("Our Website", "http://portals.apache.org/jetspeed-2"));
@@ -198,7 +200,8 @@
 
     }
     
-    public void testUpdateSite() throws Exception {
+    public void testUpdateSite() throws Exception 
+    {
         addTestSite();
         
         SSOSite s = ssoManager.getSiteByName(TESTSITE);
@@ -234,7 +237,8 @@
         assertEquals("siteURL",s.getURL());
     }
     
-    public void testFecthSitesForSubject() throws Exception {
+    public void testFecthSitesForSubject() throws Exception 
+    {
         addTestUser();
         addAnotherTestUser();
         addTestSite();
@@ -263,7 +267,8 @@
         assertEquals(2, sites.size());
     }
     
-    public void testAddAndFetchUsers() throws Exception {
+    public void testAddAndFetchUsers() throws Exception 
+    {
         addTestUser();
         addAnotherTestUser();
         addTestSite();
@@ -285,8 +290,8 @@
         s.getPrincipals().add(subjectUser); // add twice 
         s.getPrincipals().add(subjectGroup);
         // the following principal should just be ignored
-        s.getPrincipals().add(new Principal(){
-
+        s.getPrincipals().add(new Principal()
+        {
             public String getName()
             {
                 return "someNonJetspeedPrincipal";
@@ -310,7 +315,8 @@
         assertNotNull(someRemoteUser);
     }
 
-    public void testAddDuplicateSite() throws Exception {        
+    public void testAddDuplicateSite() throws Exception 
+    {        
         ssoManager.addSite(ssoManager.newSite(TESTSITE, "http://www.blah.com"));
 
         try{
@@ -332,7 +338,8 @@
     /**
      * Tests SSOManager.testAddUserForLocalGroup()
      */
-    public void testAddUserForLocalGroup() throws Exception {
+    public void testAddUserForLocalGroup() throws Exception 
+    {
         addTestGroup();
         addTestSite(); 
         
@@ -347,7 +354,8 @@
         assertNotNull(someRemoteUser);
     }
     
-    public void testRemoveUser() throws Exception {
+    public void testRemoveUser() throws Exception 
+    {
         addTestUser();
         addTestSite();
         
@@ -372,16 +380,20 @@
     /**
      * Tests SSOManager.addUser()
      */
-    public void testAddDuplicateUser() throws Exception {
+    public void testAddDuplicateUser() throws Exception 
+    {
         addTestUser();
         addTestSite();
         
         ssoManager.addUser(testSite, testuser, "someRemoteUser", "someRemotePwd");
 
-        try{
+        try
+        {
             ssoManager.addUser(testSite, testuser, "someRemoteUser", "whatever");
             throw new Exception("Test failed: duplicate user was added");
-        } catch (SSOException ssoe){
+        } 
+        catch (SSOException ssoe)
+        {
             
         }
         Collection<SSOUser> remoteUsers = ssoManager.getRemoteUsers(testSite, testuser);
@@ -389,16 +401,18 @@
         
         // test adding remote user with other local user
         addAnotherTestUser();
-        try{
+        try
+        {
             ssoManager.addUser(testSite, anotherTestuser, "someRemoteUser", "myOwnPwd");
             throw new Exception("Test failed: duplicate user was added");
-        } catch (SSOException ssoe){
-            
-        }
-        
+        } 
+        catch (SSOException ssoe)
+        {            
+        }        
     }
     
-    public void testCredentials() throws Exception {
+    public void testCredentials() throws Exception 
+    {
         addTestUser();
         addTestSite();
         
@@ -412,7 +426,8 @@
 
     }
     
-    public void testFetchPortalPrincipals() throws Exception {
+    public void testFetchPortalPrincipals() throws Exception 
+    {
         addTestUser();
         addAnotherTestUser();
         addTestGroup();
@@ -437,27 +452,33 @@
 
     }
     
-    public void addTestSite() throws Exception {
+    public void addTestSite() throws Exception
+    {
         testSite = ssoManager.addSite(ssoManager.newSite(TESTSITE, "http://www.blah.com"));
     }
-    
-    public void addAnotherTestSite() throws Exception {
+
+    public void addAnotherTestSite() throws Exception
+    {
         anotherTestSite = ssoManager.addSite(ssoManager.newSite(ANOTHER_TESTSITE, "http://www.alternative.com"));
     }
-    
-    public void addTestUser() throws Exception {
+
+    public void addTestUser() throws Exception
+    {
         testuser = ums.addUser(TESTUSER);
     }
-    
-    public void addAnotherTestUser() throws Exception {
+
+    public void addAnotherTestUser() throws Exception
+    {
         anotherTestuser = ums.addUser(ANOTHER_TESTUSER);
     }
-    
-    public void addTestGroup() throws Exception {
+
+    public void addTestGroup() throws Exception
+    {
         testgroup = gms.addGroup(TESTGROUP);
     }
-    
-    public void addAnotherTestGroup() throws Exception {
+
+    public void addAnotherTestGroup() throws Exception
+    {
         anotherTestgroup = gms.addGroup(ANOTHER_TESTGROUP);
     }
     
@@ -508,11 +529,14 @@
         return new TestSuite(TestSSOManager.class);
     }
 
-    protected void tryRemovePrincipal(PrincipalTypeManager pman, String pname){
-        try{
+    protected void tryRemovePrincipal(PrincipalTypeManager pman, String pname)
+    {
+        try
+        {
             pman.getPrincipalManager().removePrincipal(pname);
-        } catch (Exception e){
-            
+        } 
+        catch (Exception e)
+        {            
         }
     }
     
@@ -527,9 +551,11 @@
         
         Collection<SSOSite> sites = ssoManager.getSites("");
         if (sites != null){
-            for (SSOSite site : sites){
+            for (SSOSite site : sites)
+            {
                 Collection<SSOUser> users = ssoManager.getUsersForSite(site);
-                for (SSOUser user : users){
+                for (SSOUser user : users)
+                {
                     ssoManager.removeUser(user);
                 }
                 ssoManager.removeSite(site);

Modified: portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java?rev=770522&r1=770521&r2=770522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-api/src/main/java/org/apache/jetspeed/CommonPortletServices.java
Fri May  1 03:28:15 2009
@@ -56,5 +56,6 @@
     public final static String CPS_JETSPEED_SERIALIZER = "cps:JetspeedSerializer";
     public final static String CPS_JETSPEED_PRINCIPAL_MANAGER_PROVIDER = "cps:JetspeedPrincipalManagerProvider";
     public final static String CPS_PORTLET_APPLICATION_MANAGER = "cps:PAM";
+    public final static String CPS_AUTHENTICATION_PROVIDER = "cps:AuthenticationProvider";
     
 }
\ No newline at end of file

Modified: portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml?rev=770522&r1=770521&r2=770522&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-portal-resources/src/main/resources/assembly/jetspeed-services.xml
Fri May  1 03:28:15 2009
@@ -126,6 +126,9 @@
         <entry key="JetspeedPrincipalManagerProvider">
           <ref bean="org.apache.jetspeed.security.spi.JetspeedPrincipalManagerProvider"
/>
         </entry>
+        <entry key="AuthenticationProvider">
+        	<ref bean="org.apache.jetspeed.security.AuthenticationProvider" />
+        </entry>
         <!--<entry key="SecurityAttributesProvider">
           <ref bean="org.apache.jetspeed.security.attributes.SecurityAttributesProvider"
/>
           </entry>-->



---------------------------------------------------------------------
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