continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r419712 - in /maven/continuum/branches/continuum-acegi: continuum-webapp/src/main/resources/plexus-application.xml continuum-webapp/src/main/webapp/WEB-INF/web.xml pom.xml
Date Thu, 06 Jul 2006 21:53:27 GMT
Author: carlos
Date: Thu Jul  6 14:53:26 2006
New Revision: 419712

URL: http://svn.apache.org/viewvc?rev=419712&view=rev
Log:
Use plexus as IoC for Acegi

Modified:
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml
    maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml
    maven/continuum/branches/continuum-acegi/pom.xml

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml?rev=419712&r1=419711&r2=419712&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/resources/plexus-application.xml
Thu Jul  6 14:53:26 2006
@@ -281,17 +281,25 @@
     <!--
      | Acegi
      -->
+<!--
     <component>
       <role>org.acegisecurity.util.FilterChainProxy</role>
       <implementation>org.acegisecurity.util.FilterChainProxy</implementation>
+      <requirements>
+        <requirement>
+          <role>org.acegisecurity.intercept.web.FilterInvocationDefinitionMap</role>
+          <field-name>filterInvocationDefinitionSource</field-name>
+        </requirement>
+      </requirements>
       <configuration>
         <filterInvocationDefinitionSource>
             CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
             PATTERN_TYPE_APACHE_ANT
-            /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,securityEnforcementFilter,filterSecurityInterceptor
+            /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,exceptionTranslationFilter,filterSecurityInterceptor
         </filterInvocationDefinitionSource>
       </configuration>
     </component>
+-->
 
     <component>
       <role>org.acegisecurity.providers.ProviderManager</role>
@@ -309,9 +317,36 @@
       <implementation>org.acegisecurity.userdetails.memory.InMemoryDaoImpl</implementation>
       <configuration>
         <userMap>
-          <marissa>koala,ROLE_USER,ROLE_SUPERVISOR</marissa>
-          <dianne>emu,ROLE_USER</dianne>
-          <scott>wombat,ROLE_USER</scott>
+          <users>
+            <user>
+              <name>marissa</name>
+              <userAttribute>
+                <password>koala</password>
+                <authorities>
+                  <grantedAuthority>ROLE_USER</grantedAuthority>
+                  <grantedAuthority>ROLE_SUPERVISOR</grantedAuthority>
+                </authorities>
+              </userAttribute>
+            </user>
+            <user>
+              <name>dianne</name>
+              <userAttribute>
+                <password>emu</password>
+                <authorities>
+                  <grantedAuthority>ROLE_USER</grantedAuthority>
+                </authorities>
+              </userAttribute>
+            </user>
+            <user>
+              <name>scott</name>
+              <userAttribute>
+                <password>wombat</password>
+                <authorities>
+                  <grantedAuthority>ROLE_USER</grantedAuthority>
+                </authorities>
+              </userAttribute>
+            </user>
+          </users>
         </userMap>
       </configuration>
     </component>
@@ -401,10 +436,18 @@
         </requirement>
       </requirements>
       <configuration>
-        <objectDefinitionSource>
-          CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
-          PATTERN_TYPE_APACHE_ANT
-          /secure/**=ROLE_USER
+        <objectDefinitionSource implementation="org.acegisecurity.intercept.web.FilterInvocationDefinitionDecorator">
+          <decorated implementation="org.acegisecurity.intercept.web.PathBasedFilterInvocationDefinitionMap"/>
+          <convertUrlToLowercaseBeforeComparison>true</convertUrlToLowercaseBeforeComparison>
+          <mappings>
+            <filterInvocationDefinitionSourceMapping>
+              <url>/secure/**</url>
+              <configAttributes>
+                <configAttribute>ROLE_USER</configAttribute>
+                <configAttribute>ROLE_ADMIN</configAttribute>
+              </configAttributes>
+            </filterInvocationDefinitionSourceMapping>
+          </mappings>
         </objectDefinitionSource>
       </configuration>
     </component>

Modified: maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml?rev=419712&r1=419711&r2=419712&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml
(original)
+++ maven/continuum/branches/continuum-acegi/continuum-webapp/src/main/webapp/WEB-INF/web.xml
Thu Jul  6 14:53:26 2006
@@ -24,6 +24,8 @@
     <filter-class>org.codehaus.plexus.xwork.PlexusFilter</filter-class>
   </filter>
 
+<!--
+  Not integrated with plexus
   <filter>
     <filter-name>Acegi Filter Chain Proxy</filter-name>
     <filter-class>org.apache.maven.continuum.web.filter.FilterToComponentProxy</filter-class>
@@ -32,6 +34,43 @@
       <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
     </init-param>
   </filter>
+-->
+
+  <filter>
+    <filter-name>Acegi HttpSessionContextIntegrationFilter</filter-name>
+    <filter-class>org.apache.maven.continuum.web.filter.FilterToComponentProxy</filter-class>
+    <init-param>
+      <param-name>component</param-name>
+      <param-value>org.acegisecurity.context.HttpSessionContextIntegrationFilter</param-value>
+    </init-param>
+  </filter>
+
+  <filter>
+    <filter-name>Acegi AuthenticationProcessingFilter</filter-name>
+    <filter-class>org.apache.maven.continuum.web.filter.FilterToComponentProxy</filter-class>
+    <init-param>
+      <param-name>component</param-name>
+      <param-value>org.acegisecurity.ui.webapp.AuthenticationProcessingFilter</param-value>
+    </init-param>
+  </filter>
+
+  <filter>
+    <filter-name>Acegi ExceptionTranslationFilter</filter-name>
+    <filter-class>org.apache.maven.continuum.web.filter.FilterToComponentProxy</filter-class>
+    <init-param>
+      <param-name>component</param-name>
+      <param-value>org.acegisecurity.ui.ExceptionTranslationFilter</param-value>
+    </init-param>
+  </filter>
+
+  <filter>
+    <filter-name>Acegi FilterSecurityInterceptor</filter-name>
+    <filter-class>org.apache.maven.continuum.web.filter.FilterToComponentProxy</filter-class>
+    <init-param>
+      <param-name>component</param-name>
+      <param-value>org.acegisecurity.intercept.web.FilterSecurityInterceptor</param-value>
+    </init-param>
+  </filter>
 
   <filter>
     <filter-name>webwork-cleanup</filter-name>
@@ -54,8 +93,30 @@
     <url-pattern>/*</url-pattern>
   </filter-mapping>
 
+<!--
   <filter-mapping>
     <filter-name>Acegi Filter Chain Proxy</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+-->
+
+  <filter-mapping>
+    <filter-name>Acegi HttpSessionContextIntegrationFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+  <filter-mapping>
+    <filter-name>Acegi AuthenticationProcessingFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+  <filter-mapping>
+    <filter-name>Acegi ExceptionTranslationFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+
+  <filter-mapping>
+    <filter-name>Acegi FilterSecurityInterceptor</filter-name>
     <url-pattern>/*</url-pattern>
   </filter-mapping>
 

Modified: maven/continuum/branches/continuum-acegi/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/branches/continuum-acegi/pom.xml?rev=419712&r1=419711&r2=419712&view=diff
==============================================================================
--- maven/continuum/branches/continuum-acegi/pom.xml (original)
+++ maven/continuum/branches/continuum-acegi/pom.xml Thu Jul  6 14:53:26 2006
@@ -79,6 +79,14 @@
         <enabled>false</enabled>
       </releases>
     </repository>
+    <repository>
+      <id>acegi-snapshot</id>
+      <name>Acegi snapshot repository</name>
+      <url>http://acegisecurity.sourceforge.net/repository/snapshots</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </repository>
   </repositories>
   <pluginRepositories>
     <pluginRepository>
@@ -407,7 +415,7 @@
       <dependency>
         <groupId>org.acegisecurity</groupId>
         <artifactId>acegi-security</artifactId>
-        <version>1.0.1</version>
+        <version>1.1-SNAPSHOT</version>
         <scope>runtime</scope>
       </dependency>
     </dependencies>



Mime
View raw message