You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gi...@apache.org on 2007/06/27 16:33:09 UTC
svn commit: r551178 - in /cocoon/trunk: ./ blocks/
blocks/cocoon-auth/cocoon-acegisecurity-sample/
blocks/cocoon-auth/cocoon-acegisecurity-sample/src/
blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/
blocks/cocoon-auth/cocoon-acegisecurity-samp...
Author: giacomo
Date: Wed Jun 27 07:33:06 2007
New Revision: 551178
URL: http://svn.apache.org/viewvc?view=rev&rev=551178
Log:
added cocoon-acegisecurity-sample block
Added:
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/ (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/pom.xml (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/rcl.properties (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/java/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/cocoon-acegisecurity-sample.xslt (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/login.xml (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/sitemap.xmap (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/welcome.xml (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/cocoon-acegisecurity.xml (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/servlet-service.xml (with props)
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/xpatch/
cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/xpatch/acegi-filter-patch.xweb (with props)
Modified:
cocoon/trunk/blocks/pom.xml
cocoon/trunk/pom.xml
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Jun 27 07:33:06 2007
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+target
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/pom.xml?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/pom.xml (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/pom.xml Wed Jun 27 07:33:06 2007
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>cocoon-blocks-modules</artifactId>
+ <groupId>org.apache.cocoon</groupId>
+ <version>5-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
+
+ <groupId>org.apache.coocon</groupId>
+ <artifactId>cocoon-acegisecurity-sample</artifactId>
+ <name>cocoon-acegisecurity</name>
+ <version>1.0.0-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-maven-plugin</artifactId>
+ <version>1.0.0-RC1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>rcl</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>rcl</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.3</version>
+ <configuration>
+ <connectors>
+ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>8888</port>
+ <maxIdleTime>30000</maxIdleTime>
+ </connector>
+ </connectors>
+ <webAppSourceDirectory>${project.build.directory}/rcl/webapp</webAppSourceDirectory>
+ <contextPath>/</contextPath>
+ <systemProperties>
+ <systemProperty>
+ <name>org.apache.cocoon.mode</name>
+ <value>dev</value>
+ </systemProperty>
+ </systemProperties>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-core</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cocoon</groupId>
+ <artifactId>cocoon-servlet-service-components</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.acegisecurity</groupId>
+ <artifactId>acegi-security</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/rcl.properties
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/rcl.properties?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/rcl.properties (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/rcl.properties Wed Jun 27 07:33:06 2007
@@ -0,0 +1,17 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+org.apache.coocon.cocoon-acegisecurity-sample.block%classes-dir=./target/classes
\ No newline at end of file
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/rcl.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/cocoon-acegisecurity-sample.xslt
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/cocoon-acegisecurity-sample.xslt?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/cocoon-acegisecurity-sample.xslt (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/cocoon-acegisecurity-sample.xslt Wed Jun 27 07:33:06 2007
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title>Apache Cocoon: Welcome!</title>
+ </head>
+ <body>
+ <xsl:copy-of select="content/*"/>
+ </body>
+ </html>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/cocoon-acegisecurity-sample.xslt
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/login.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/login.xml?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/login.xml (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/login.xml Wed Jun 27 07:33:06 2007
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<content>
+ <h1>Apache Cocoon: Login</h1>
+ <p>Enter your user name and password</p>
+ <dl>
+ <dt>cocoon/cocoon</dt>
+ <dd>This username/password pair will give you supervisor permission</dd>
+ <dt>guest/guest</dt>
+ <dd>This username/password pair will give you user permission</dd>
+ <dt>other/other</dt>
+ <dd>
+ This username/password pair will give you
+ <em>NO</em>
+ permission
+ </dd>
+ </dl>
+ <form method="post" action="security_check">
+ <table>
+ <tr>
+ <td>User:</td>
+ <td>
+ <input type="text" name="j_username" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td>Password:</td>
+ <td>
+ <input type="password" name="j_password" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan='2'>
+ <input name="submit" type="submit" />
+ </td>
+ </tr>
+ </table>
+ </form>
+</content>
\ No newline at end of file
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/login.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/sitemap.xmap?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/sitemap.xmap (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/sitemap.xmap Wed Jun 27 07:33:06 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<map:sitemap xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://apache.org/cocoon/sitemap/1.0 http://cocoon.apache.org/schema/sitemap/cocoon-sitemap-1.0.xsd"
+ xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+ <map:pipelines>
+ <map:pipeline id="acegisecurity">
+ <map:match pattern="">
+ <map:generate src="welcome.xml"/>
+ <map:transform src="cocoon-acegisecurity-sample.xslt"/>
+ <map:serialize type="xhtml"/>
+ </map:match>
+ <map:match pattern="login">
+ <map:generate src="login.xml"/>
+ <map:transform src="cocoon-acegisecurity-sample.xslt"/>
+ <map:serialize type="xhtml"/>
+ </map:match>
+ </map:pipeline>
+ </map:pipelines>
+
+</map:sitemap>
\ No newline at end of file
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/welcome.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/welcome.xml?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/welcome.xml (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/welcome.xml Wed Jun 27 07:33:06 2007
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<content>
+ <h1>Apache Cocoon: Welcome</h1>
+ <p>This block <strong>org.apache.coocon:cocoon-acegisecurity</strong> was created by the Cocoon block archetype.</p>
+ <p/>
+ <p>Please <a href="login">login</a> to see more.</p>
+</content>
\ No newline at end of file
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/COB-INF/welcome.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/cocoon-acegisecurity.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/cocoon-acegisecurity.xml?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/cocoon-acegisecurity.xml (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/cocoon-acegisecurity.xml Wed Jun 27 07:33:06 2007
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- @version $Id$ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+ <!-- Automatically receives AuthenticationEvent messages -->
+ <bean id="loggerListener" class="org.acegisecurity.event.authentication.LoggerListener" />
+
+ <!-- ======================== FILTER CHAIN ======================= -->
+
+ <bean id="filterChainProxy" class="org.acegisecurity.util.FilterChainProxy">
+ <property name="filterInvocationDefinitionSource">
+ <value>
+ CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
+ PATTERN_TYPE_APACHE_ANT
+ /**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,securityContextHolderAwareRequestFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
+ </value>
+ </property>
+ </bean>
+
+ <!-- ======================== SESSION CONTEXT INTEGRATION ======================= -->
+
+ <bean id="httpSessionContextIntegrationFilter"
+ class="org.acegisecurity.context.HttpSessionContextIntegrationFilter" />
+
+ <!-- ======================== LOGOUT ======================= -->
+
+ <bean id="logoutFilter" class="org.acegisecurity.ui.logout.LogoutFilter">
+ <constructor-arg value="/cocoon-acegisecurity-sample/welcome" /><!-- URL redirected to after logout -->
+ <constructor-arg>
+ <list>
+ <bean class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler" />
+ </list>
+ </constructor-arg>
+ </bean>
+
+ <!-- ===================== HTTP REQUEST SECURITY ==================== -->
+
+ <bean id="authenticationProcessingFilter"
+ class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
+ <property name="authenticationManager" ref="authenticationManager" />
+ <property name="authenticationFailureUrl" value="/cocoon-acegisecurity-sample/login?login_error=1" />
+ <property name="defaultTargetUrl" value="/cocoon-acegisecurity-sample/welcome" />
+ <property name="filterProcessesUrl" value="/cocoon-acegisecurity-sample/security_check" />
+ </bean>
+
+ <bean id="authenticationManager" class="org.acegisecurity.providers.ProviderManager">
+ <property name="providers">
+ <list>
+ <ref local="daoAuthenticationProvider" />
+ <ref local="anonymousAuthenticationProvider" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="daoAuthenticationProvider"
+ class="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
+ <property name="userDetailsService" ref="inMemoryDaoImpl" />
+ <property name="forcePrincipalAsString"><value>true</value></property>
+ </bean>
+
+ <bean id="inMemoryDaoImpl" class="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
+ <property name="userMap">
+ <value>
+ cocoon=cocoon,ROLE_USER,ROLE_SUPERVISOR
+ guest=guest,ROLE_USER
+ other=other,ROLE_OTHER
+ </value>
+ </property>
+ </bean>
+
+ <bean id="anonymousAuthenticationProvider"
+ class="org.acegisecurity.providers.anonymous.AnonymousAuthenticationProvider">
+ <property name="key" value="foobar"/>
+ </bean>
+
+ <!-- ===================== SECURITY CONTEXT HOLDER AWARE REQUEST ==================== -->
+
+ <bean id="securityContextHolderAwareRequestFilter"
+ class="org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter" />
+
+ <!-- ===================== ANONYMOUS USER PROCESSING ==================== -->
+
+ <bean id="anonymousProcessingFilter" class="org.acegisecurity.providers.anonymous.AnonymousProcessingFilter">
+ <property name="key" value="foobar"/>
+ <property name="userAttribute" value="anonymousUser,ROLE_ANONYMOUS"/>
+ </bean>
+
+ <!-- ===================== EXCEPTION TRANSLATION ==================== -->
+
+ <bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter">
+ <property name="authenticationEntryPoint" ref="authenticationProcessingFilterEntryPoint"/>
+ <property name="accessDeniedHandler">
+ <bean class="org.acegisecurity.ui.AccessDeniedHandlerImpl">
+ <property name="errorPage" value="/cocoon-acegisecurity-sample/accessDenied" />
+ </bean>
+ </property>
+ </bean>
+
+ <bean id="authenticationProcessingFilterEntryPoint"
+ class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint">
+ <property name="loginFormUrl" value="/cocoon-acegisecurity-sample/login"/>
+ <property name="forceHttps" value="false"/>
+ </bean>
+
+ <!-- ===================== INVOCATION INTERCEPTOR ==================== -->
+
+ <!-- Note the order that entries are placed against the objectDefinitionSource is critical.
+ The FilterSecurityInterceptor will work from the top of the list down to the FIRST pattern that matches the request URL.
+ Accordingly, you should place MOST SPECIFIC (ie a/b/c/d.*) expressions first, with LEAST SPECIFIC (ie a/.*) expressions last -->
+ <bean id="filterInvocationInterceptor"
+ class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
+ <property name="authenticationManager" ref="authenticationManager"/>
+ <property name="accessDecisionManager" ref="httpRequestAccessDecisionManager"/>
+ <property name="objectDefinitionSource">
+ <value>
+ CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
+ PATTERN_TYPE_APACHE_ANT
+ /cocoon-acegisecurity-sample/welcome=ROLE_ANONYMOUS,ROLE_USER
+ /cocoon-acegisecurity-sample/login=ROLE_ANONYMOUS,ROLE_USER
+ /cocoon-acegisecurity-sample/accessdenied=ROLE_ANONYMOUS,ROLE_USER
+ /cocoon-acegisecurity-sample/supervisor=ROLE_SUPERVISOR
+ /cocoon-acegisecurity-sample/**=ROLE_USER
+ </value>
+ </property>
+ </bean>
+
+ <bean id="httpRequestAccessDecisionManager" class="org.acegisecurity.vote.AffirmativeBased">
+ <property name="allowIfAllAbstainDecisions" value="false"/>
+ <property name="decisionVoters">
+ <list>
+ <ref bean="roleVoter" />
+ </list>
+ </property>
+ </bean>
+
+ <!-- An access decision voter that reads ROLE_* configuration settings -->
+ <bean id="roleVoter" class="org.acegisecurity.vote.RoleVoter"/>
+
+</beans>
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/cocoon-acegisecurity.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/servlet-service.xml?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/servlet-service.xml (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/servlet-service.xml Wed Jun 27 07:33:06 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ und
+-->
+<!--+
+ | @version $Id: servlet-service.xml 523714 2007-03-29 13:54:20Z gkossakowski $
+ +-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:servlet="http://cocoon.apache.org/schema/servlet"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+ <bean id="org.apache.coocon.cocoon-acegisecurity-sample.block" class="org.apache.cocoon.sitemap.SitemapServlet">
+ <servlet:context mount-path="/cocoon-acegisecurity-sample" context-path="blockcontext:/cocoon-acegisecurity-sample/"/>
+ </bean>
+
+</beans>
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/spring/servlet-service.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/xpatch/acegi-filter-patch.xweb
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/xpatch/acegi-filter-patch.xweb?view=auto&rev=551178
==============================================================================
--- cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/xpatch/acegi-filter-patch.xweb (added)
+++ cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/xpatch/acegi-filter-patch.xweb Wed Jun 27 07:33:06 2007
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!-- Version: $Id$ -->
+<xweb xpath="/*" insert-before="*[last() and local-name() = 'filter']">
+ <!--+
+ | Declare a filter for acegisecurity handling
+ +-->
+ <filter>
+ <description>Security Filter Chain Proxy</description>
+ <display-name>Security Filter Chain Proxy</display-name>
+ <filter-name>SecurityFilterChainProxy</filter-name>
+ <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
+ <init-param>
+ <param-name>targetClass</param-name>
+ <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
+ </init-param>
+ </filter>
+
+ <!--+
+ | Map filter for acegisecurity handling
+ +-->
+ <filter-mapping>
+ <filter-name>SecurityFilterChainProxy</filter-name>
+ <servlet-name>DispatcherServlet</servlet-name>
+ </filter-mapping>
+</xweb>
Propchange: cocoon/trunk/blocks/cocoon-auth/cocoon-acegisecurity-sample/src/main/resources/META-INF/cocoon/xpatch/acegi-filter-patch.xweb
------------------------------------------------------------------------------
svn:eol-style = native
Modified: cocoon/trunk/blocks/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/pom.xml?view=diff&rev=551178&r1=551177&r2=551178
==============================================================================
--- cocoon/trunk/blocks/pom.xml (original)
+++ cocoon/trunk/blocks/pom.xml Wed Jun 27 07:33:06 2007
@@ -16,11 +16,9 @@
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--->
-<!--+
+--><!--+
| @version $Id$
- +-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
@@ -118,6 +116,7 @@
</activation>
<modules>
<module>cocoon-asciiart</module>
+ <module>cocoon-auth/cocoon-acegisecurity-sample</module>
<module>cocoon-auth/cocoon-auth-api</module>
<module>cocoon-auth/cocoon-auth-impl</module>
<module>cocoon-auth/cocoon-auth-sample</module>
Modified: cocoon/trunk/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/pom.xml?view=diff&rev=551178&r1=551177&r2=551178
==============================================================================
--- cocoon/trunk/pom.xml (original)
+++ cocoon/trunk/pom.xml Wed Jun 27 07:33:06 2007
@@ -1107,6 +1107,11 @@
<dependencyManagement>
<dependencies>
<dependency>
+ <groupId>org.acegisecurity</groupId>
+ <artifactId>acegi-security</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.avalon.framework</groupId>
<artifactId>avalon-framework-api</artifactId>
<version>4.3.1</version>
@@ -3471,4 +3476,4 @@
</pluginRepositories>
</profile>
</profiles>
-</project>
\ No newline at end of file
+</project>