cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r1195029 - in /cocoon/cocoon3/trunk: ./ cocoon-shiro-sample/ cocoon-shiro-sample/rcl-config/ cocoon-shiro-sample/rcl-config/WEB-INF/ cocoon-shiro-sample/rcl-config/WEB-INF/classes/ cocoon-shiro-sample/src/ cocoon-shiro-sample/src/main/ coco...
Date Sat, 29 Oct 2011 20:49:11 GMT
Author: thorsten
Date: Sat Oct 29 20:49:09 2011
New Revision: 1195029

URL: http://svn.apache.org/viewvc?rev=1195029&view=rev
Log:
Extracting cocoon-shiro from customer project for becompany.ch and codebusters.es.
Adding cocoon-shiro-sample to show the integration of apache shiro into c3.

Added:
    cocoon/cocoon3/trunk/cocoon-shiro/   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/pom.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/WEB-INF/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/WEB-INF/classes/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/WEB-INF/classes/logback.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl.properties   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/App.java   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/LoginUser.java   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/Logout.java   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/admin.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/loggedout.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/login.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure1.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure2.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/sitemap.xmap   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/welcome.html   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-application-context.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/shiro.ini
    cocoon/cocoon3/trunk/cocoon-shiro/pom.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/
    cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/WEB-INF/
    cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/WEB-INF/classes/
    cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/WEB-INF/classes/logback.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/rcl.properties   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/src/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogin.java   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogout.java   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/sitemap/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/sitemap/expression/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/sitemap/expression/ShiroInterpreter.java   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/sitemap.xmap   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/welcome.html   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/spring/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/spring/cocoon-shiro-context.xml   (with props)
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/xpatch/
    cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/xpatch/shiro.xweb   (with props)
Modified:
    cocoon/cocoon3/trunk/parent/pom.xml
    cocoon/cocoon3/trunk/pom.xml

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Oct 29 20:49:09 2011
@@ -0,0 +1,5 @@
+.classpath
+.project
+.settings
+target
+build

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Oct 29 20:49:09 2011
@@ -0,0 +1,5 @@
+.classpath
+.project
+.settings
+target
+build

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/pom.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/pom.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/pom.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,145 @@
+<?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.
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.cocoon.parent</groupId>
+    <artifactId>cocoon-parent</artifactId>
+    <version>3.0.0-beta-1-SNAPSHOT</version>
+    <relativePath>../parent/pom.xml</relativePath>
+  </parent>
+  <artifactId>cocoon-shiro-sample</artifactId>
+  <name>Apache Cocoon 3: Shiro sample integration</name>
+  <description>org.apache.cocoon.parent:cocoon-shiro-sample:3.0.0-beta-1-SNAPSHOT</description>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-eclipse-plugin</artifactId>
+        <version>2.8</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.cocoon</groupId>
+        <artifactId>cocoon-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>compile</phase>
+            <goals>
+              <goal>prepare</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <webappProfile>ssf</webappProfile>
+          <customWebappDirectory>rcl-config</customWebappDirectory>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty-plugin</artifactId>
+        <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>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Cocoon-Block-Name>${project.artifactId}</Cocoon-Block-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.cocoon</groupId>
+                    <artifactId>cocoon-maven-plugin</artifactId>
+                    <versionRange>[1.0.0,)</versionRange>
+                    <goals>
+                      <goal>prepare</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cocoon.servlet</groupId>
+      <artifactId>cocoon-servlet</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon.stringtemplate</groupId>
+      <artifactId>cocoon-stringtemplate</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon.shiro</groupId>
+      <artifactId>cocoon-shiro</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-spring</artifactId>
+    </dependency>
+  </dependencies>
+</project>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/WEB-INF/classes/logback.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/WEB-INF/classes/logback.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/WEB-INF/classes/logback.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/WEB-INF/classes/logback.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,42 @@
+<?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.
+ -->
+<configuration>
+  <!--
+    - This is a sample configuration for logback.
+    - It simply just logs everything into a single log file.
+    -->
+    <appender name="CORE" class="ch.qos.logback.core.FileAppender">
+        <file>./target/work/log/cocoon.log</file>
+        <append>false</append>
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>%d %-5p %t %c - %m%n</pattern>
+        </encoder>
+    </appender>
+    
+    <logger name="org.apache.cocoon" additivity="false">
+        <level value="DEBUG"/>
+        <appender-ref ref="CORE"/>
+    </logger>
+    
+    <root>
+        <level value="WARN"/>
+        <appender-ref ref="CORE"/>
+    </root>
+</configuration>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl-config/WEB-INF/classes/logback.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl.properties
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl.properties?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl.properties (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl.properties Sat Oct 29 20:49:09 2011
@@ -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.cocoon.parent.cocoon-shiro-sample.service%classes-dir=./target/classes
\ No newline at end of file

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/rcl.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/App.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/App.java?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/App.java (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/App.java Sat Oct 29 20:49:09 2011
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.shiro.sample;
+
+/**
+ * Hello world!
+ */
+public class App {
+
+    public static void main(String[] args) {
+        System.out.println("Hello World!");
+    }
+
+}

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/App.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/LoginUser.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/LoginUser.java?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/LoginUser.java (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/LoginUser.java Sat Oct 29 20:49:09 2011
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.shiro.sample.rest;
+
+
+import org.apache.cocoon.rest.controller.annotation.RESTController;
+import org.apache.cocoon.shiro.rest.AbstractShiroLogin;
+
+@RESTController
+public class LoginUser extends AbstractShiroLogin {
+    private static final String DEFAULT_SUCCESS = "/secure/1";
+
+    private static final String LOGIN_PAGE = "servlet:/screen/login";
+
+    protected String getLoginPage() {
+        return LOGIN_PAGE;
+    }
+
+    protected String getDefaultTo() {
+        return DEFAULT_SUCCESS;
+    }
+
+    protected String getErrorLogin() {
+        return getLoginPage();
+    }
+
+}

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/LoginUser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/Logout.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/Logout.java?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/Logout.java (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/Logout.java Sat Oct 29 20:49:09 2011
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.shiro.sample.rest;
+
+import org.apache.cocoon.rest.controller.annotation.RESTController;
+import org.apache.cocoon.shiro.rest.AbstractShiroLogout;
+
+@RESTController
+public class Logout extends AbstractShiroLogout{
+    private static final String DEFAULT_TO = "/loggedout";
+    protected String getDefaultTo() {
+        return DEFAULT_TO;
+    }
+}

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/java/org/apache/cocoon/shiro/sample/rest/Logout.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/admin.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/admin.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/admin.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/admin.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,30 @@
+<?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.
+ -->
+<html>
+	<head>
+    <title>Welcome Admin</title>
+  </head>
+  <body>
+    <h1>Welcome Admin</h1>
+    <p>You have successfully logged in as  Admin</p>
+    <p>isUser=$isUser$</p>
+    <p>uid=$uid$</p>
+  </body>
+</html>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/admin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/loggedout.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/loggedout.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/loggedout.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/loggedout.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,28 @@
+<?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.
+ -->
+<html>
+	<head>
+    <title>logout</title>
+  </head>
+  <body>
+    <h1>logout</h1>
+    <p>You have successfully logged out</p>
+  </body>
+</html>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/loggedout.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/login.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/login.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/login.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/login.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,40 @@
+<?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.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Login</title>
+  </head>
+  <body>
+    <h1>Please login</h1>
+	<p>to = $to$</p>
+     <div>
+     	<h2>Enter user ID and password: </h2>
+      <form method="post" action="login">
+        <strong> User ID (c3 [admin], x [user])</strong><br/>
+        <input type="text" size="20" name="username"></input><br/>
+        <strong> Password (c3 [admin], x [user])</strong><br/>
+        <input type="hidden" name="to" value="$to$"></input>
+        <input type="password" size="20" name="password"></input><br/>
+        <input type="submit" name="login" value="Login"></input>
+      </form>
+      $if(error)$
+      <strong>error: $error$ There has been an error in the login.</strong>
+      $endif$
+    </div>
+  </body>
+</html>
\ No newline at end of file

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/login.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure1.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure1.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure1.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure1.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,30 @@
+<?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.
+ -->
+<html>
+    <head>
+    <title>Welcome user</title>
+  </head>
+  <body>
+    <h1>Welcome user</h1>
+    <p>You have successfully logged in as user/admin</p>
+    <p>isUser=$isUser$</p>
+    <p>uid=$uid$</p>
+  </body>
+</html>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure2.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure2.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure2.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure2.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,30 @@
+<?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.
+ -->
+<html>
+    <head>
+    <title>Welcome user</title>
+  </head>
+  <body>
+    <h1>Welcome user</h1>
+    <p>You have successfully logged in as user/admin via secure2</p>
+    <p>isUser=$isUser$</p>
+    <p>uid=$uid$</p>
+  </body>
+</html>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/secure2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/sitemap.xmap?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/sitemap.xmap (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/sitemap.xmap Sat Oct 29 20:49:09 2011
@@ -0,0 +1,53 @@
+<?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. -->
+<!-- $Id: sitemap.xmap 697547 2008-09-21 16:52:48Z reinhard $ -->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap"
+  xmlns:servlet="http://apache.org/cocoon/servlet" xmlns:controller="http://apache.org/cocoon/controller">
+
+  <map:pipelines>
+    <map:pipeline>
+      <map:match pattern="">
+        <map:read src="welcome.html" />
+      </map:match>
+      <!-- usermgt -->
+      <map:match pattern="login">
+        <controller:call controller="rest-controller"
+          select="org.apache.cocoon.shiro.sample.rest.LoginUser" />
+      </map:match>
+      <map:match pattern="logout">
+        <controller:call controller="rest-controller"
+          select="org.apache.cocoon.shiro.sample.rest.Logout" />
+      </map:match>
+      <map:match pattern="screen/login">
+        <map:generate src="login.xml"
+          type="controller-aware-string-template" />
+        <map:serialize type="xhtml" />
+      </map:match>
+      <!-- other -->
+       <map:match pattern="secure/*">
+      <map:generate src="secure{map:1}.xml" type="string-template">
+          <map:parameter name="isUser" value="{shiro:authenticated}" />
+          <map:parameter name="uid" value="{shiro:principal}" />
+          </map:generate>
+        <map:serialize type="xhtml" />
+      </map:match>
+      <map:match pattern="*">
+      <map:generate src="{map:1}.xml" type="string-template">
+          <map:parameter name="isUser" value="{shiro:authenticated}" />
+          <map:parameter name="uid" value="{shiro:principal}" />
+          </map:generate>
+        <map:serialize type="xhtml" />
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
+
+</map:sitemap>
\ No newline at end of file

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/welcome.html
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/welcome.html?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/welcome.html (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/welcome.html Sat Oct 29 20:49:09 2011
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+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.
+--><!-- $Id: welcome.html 642116 2008-03-28 08:00:47Z reinhard $ -->
+<html>
+    <head>
+        <title>Welcome to cocoon-shiro-sample</title>
+    </head>
+    <body>
+        <h1>Welcome to cocoon-shiro-sample</h1>
+        <p>
+            <a href="http://shiro.apache.org/">Apache Shiro </a>is a powerful and easy-to-use Java security framework that performs authentication, 
+			authorization, cryptography, and session management. With Shiro’s easy-to-understand API, you can quickly and easily secure any application
+			 – from the smallest mobile applications to the largest web and enterprise applications.
+        </p>
+		<p>This is the sample integration into a c3 app.</p>
+        <ul>
+            <li>
+                <a href="login">login page</a>
+            </li>
+			<li>
+                <a href="secure/1">secure page 1</a>
+            </li>
+            <li>
+                <a href="secure/2">secure page 2</a>
+                - if you not logged in, you will redirected to the login page, 
+                after that to the url you requested see the source code of that page is different from 
+                the above it contains a &lt;input type="hidden" name="to" value="secure/2"&gt;. If you this in your
+                code the rest service will redirect to that value.
+            </li>
+            <li>
+                <a href="admin">admin page</a>
+                - same as secure but you need to have choosen the user c3 to see it.
+            </li>
+            <li>
+                <a href="logout">logout</a>
+            </li>
+        </ul>
+    </body>
+</html>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/COB-INF/welcome.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-application-context.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-application-context.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-application-context.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-application-context.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,82 @@
+<?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.
+-->
+<!-- $Id: block-application-context.xml 697547 2008-09-21 16:52:48Z reinhard $ -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+  xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
+  xmlns:pipeline="http://cocoon.apache.org/schema/pipeline"
+  xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+  xmlns:context="http://www.springframework.org/schema/context"
+  xsi:schemaLocation="
+  http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd
+  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+  http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+  http://cocoon.apache.org/schema/pipeline http://cocoon.apache.org/schema/pipeline/cocoon-pipeline-1.0.xsd">
+
+  <!-- Scan for all REST controllers and make them as beans available -->
+  <context:component-scan base-package="org.apache.cocoon.shiro.sample.rest"
+    use-default-filters="false"
+    name-generator="org.apache.cocoon.rest.controller.ControllerBeanNameGenerator"
+    scope-resolver="org.apache.cocoon.rest.controller.ControllerBeanScopeResolver">
+    <context:include-filter type="annotation"
+      expression="org.apache.cocoon.rest.controller.annotation.RESTController" />
+  </context:component-scan>
+  <context:annotation-config />
+  
+    <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
+    <property name="securityManager" ref="securityManager"/>
+    <property name="loginUrl" value="/login"/>
+    <!-- override these for application-specific URLs if you like:
+    <property name="successUrl" value="/home.jsp"/>
+    <property name="unauthorizedUrl" value="/unauthorized.jsp"/> -->
+    <!-- The 'filters' property is not necessary since any declared javax.servlet.Filter bean  -->
+    <!-- defined will be automatically acquired and available via its beanName in chain        -->
+    <!-- definitions, but you can perform instance overrides or name aliases here if you like: -->
+    <!-- <property name="filters">
+        <util:map>
+            <entry key="anAlias" value-ref="someFilter"/>
+        </util:map>
+    </property> -->
+    <property name="filterChainDefinitions">
+        <value>
+            # some example chain definitions:
+            /  = anon
+            /admin = authc, roles[admin]
+            /secure/** = authc
+			/**  = anon
+            # more URL-to-FilterChain definitions here
+        </value>
+    </property>
+</bean>
+
+<bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
+    <!-- Single realm app.  If you have multiple realms, use the 'realms' property instead. -->
+    <property name="realm" ref="myRealm"/>
+    <!-- By default the servlet container sessions will be used.  Uncomment this line
+         to use shiro's native sessions (see the JavaDoc for more): -->
+    <!-- <property name="sessionMode" value="native"/> -->
+</bean>
+<bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>
+<!-- Define the Shiro Realm implementation you want to use to connect to your back-end -->
+<!-- security datasource: -->
+<bean id="myRealm" class="org.apache.shiro.realm.text.IniRealm">
+    <constructor-arg value="classpath:META-INF/shiro.ini" type="java.lang.String"/>
+</bean>
+</beans>
\ No newline at end of file

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-application-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml Sat Oct 29 20:49:09 2011
@@ -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
+  und
+-->
+<!-- $Id: block-servlet-service.xml 697547 2008-09-21 16:52:48Z reinhard $ -->
+<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.5.xsd
+                           http://cocoon.apache.org/schema/servlet http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">
+
+  <bean name="org.apache.cocoon.parent.cocoon-shiro-sample.service" class="org.apache.cocoon.servlet.XMLSitemapServlet">
+    <servlet:context mount-path="" context-path="blockcontext:/cocoon-shiro-sample/"/>
+  </bean>
+
+</beans>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/shiro.ini
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/shiro.ini?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/shiro.ini (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro-sample/src/main/resources/META-INF/shiro.ini Sat Oct 29 20:49:09 2011
@@ -0,0 +1,43 @@
+#
+# 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.
+#
+# =======================
+# Shiro INI configuration
+# =======================
+
+[main]
+# Objects and their properties are defined here, 
+# Such as the securityManager, Realms and anything
+# else needed to build the SecurityManager
+
+[users]
+# The 'users' section is for simple deployments
+# when you only need a small number of statically-defined 
+# set of User accounts.
+c3 = c3, admin
+x = x, user
+
+[roles]
+# The 'roles' section is for simple deployments
+# when you only need a small number of statically-defined
+# roles.
+admin = *
+user = user:*
+
+[urls]
+# The 'urls' section is used for url-based security
+# in web applications.  We'll discuss this section in the
+# Web documentation
\ No newline at end of file

Added: cocoon/cocoon3/trunk/cocoon-shiro/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/pom.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/pom.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/pom.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,61 @@
+<?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.
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.cocoon.parent</groupId>
+    <artifactId>cocoon-parent</artifactId>
+    <version>3.0.0-beta-1-SNAPSHOT</version>
+    <relativePath>../parent/pom.xml</relativePath>
+  </parent>
+  <artifactId>cocoon-shiro</artifactId>
+  <name>Apache Cocoon 3: Shiro integration</name>
+  <description>Base to integrate Apache Shiro into c3.</description>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cocoon.servlet</groupId>
+      <artifactId>cocoon-servlet</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon.rest</groupId>
+      <artifactId>cocoon-rest</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon.stringtemplate</groupId>
+      <artifactId>cocoon-stringtemplate</artifactId>
+    </dependency>
+     <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-spring</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+  <groupId>org.apache.cocoon.shiro</groupId>
+</project>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/WEB-INF/classes/logback.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/WEB-INF/classes/logback.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/WEB-INF/classes/logback.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/WEB-INF/classes/logback.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,42 @@
+<?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.
+ -->
+<configuration>
+  <!--
+    - This is a sample configuration for logback.
+    - It simply just logs everything into a single log file.
+    -->
+    <appender name="CORE" class="ch.qos.logback.core.FileAppender">
+        <file>./target/work/log/cocoon.log</file>
+        <append>false</append>
+        <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+            <pattern>%d %-5p %t %c - %m%n</pattern>
+        </encoder>
+    </appender>
+    
+    <logger name="org.apache.cocoon" additivity="false">
+        <level value="DEBUG"/>
+        <appender-ref ref="CORE"/>
+    </logger>
+    
+    <root>
+        <level value="WARN"/>
+        <appender-ref ref="CORE"/>
+    </root>
+</configuration>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/rcl-config/WEB-INF/classes/logback.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/rcl.properties
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/rcl.properties?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/rcl.properties (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/rcl.properties Sat Oct 29 20:49:09 2011
@@ -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.cocoon.shiro.cocoon-shiro.service%classes-dir=./target/classes
\ No newline at end of file

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/rcl.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogin.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogin.java?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogin.java (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogin.java Sat Oct 29 20:49:09 2011
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.shiro.rest;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.cocoon.rest.controller.annotation.RESTController;
+import org.apache.cocoon.rest.controller.annotation.RequestParameter;
+import org.apache.cocoon.rest.controller.method.Get;
+import org.apache.cocoon.rest.controller.method.Post;
+import org.apache.cocoon.rest.controller.response.RedirectResponse;
+import org.apache.cocoon.rest.controller.response.RestResponse;
+import org.apache.cocoon.rest.controller.response.URLResponse;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.IncorrectCredentialsException;
+import org.apache.shiro.authc.UnknownAccountException;
+import org.apache.shiro.authc.UsernamePasswordToken;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.subject.Subject;
+import org.apache.shiro.web.util.SavedRequest;
+import org.apache.shiro.web.util.WebUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@RESTController
+public abstract class AbstractShiroLogin implements Post, Get{
+    
+    protected abstract String getErrorLogin() ;
+    protected abstract String getDefaultTo();
+    protected abstract String getLoginPage() ;
+    
+    @RequestParameter
+    private String username;
+    @RequestParameter
+    private String password;
+    @RequestParameter
+    protected String to;
+    protected static final Logger LOG = LoggerFactory.getLogger(AbstractShiroLogin.class);
+
+    public RestResponse doPost() throws Exception {
+        // create a UsernamePasswordToken using the
+        // username and password provided by the user
+        UsernamePasswordToken token = new UsernamePasswordToken(username,
+                password);
+        Subject subject = SecurityUtils.getSubject();
+        boolean error = true;
+        try {
+            subject.login(token);
+            error = false;
+        } catch (UnknownAccountException ex) {
+            LOG.error("UnknownAccountException", ex);
+        } catch (IncorrectCredentialsException ex) {
+            // password provided did not match password found in database
+            // for the username provided
+            LOG.error("IncorrectCredentialsException", ex);
+        } catch (Exception e) {
+            LOG.error("Exception", e);
+        } finally {
+            token.clear();
+        }
+        // clear the information stored in the token
+        if (error) {
+            Map<String, Object> data = new HashMap<String, Object>();
+            data.put("error", true);
+            data.put("to", getTo());
+            return new URLResponse(getErrorLogin(), data);
+        } else {
+            return new RedirectResponse(getTo());
+        }
+    }
+
+    public RestResponse doGet() throws Exception {
+        Subject subject = SecurityUtils.getSubject();
+        Session session = subject.getSession();
+        SavedRequest savedRequest = (SavedRequest) session
+                .getAttribute(WebUtils.SAVED_REQUEST_KEY);
+        if (null != savedRequest) {
+            to = savedRequest.getRequestURI();
+            // now remove the session again
+            session.setAttribute(WebUtils.SAVED_REQUEST_KEY, null);
+        }
+        Map<String, Object> data = new HashMap<String, Object>();
+        data.put("to", getTo());
+        // FIXME: If we activate the following $if(error)$ will kick in even if it should not!
+        //data.put("error", false);
+        return new URLResponse(getLoginPage(), data);
+    }
+
+    protected String getTo() {
+        if (StringUtils.isBlank(to)) {
+            return getDefaultTo();
+        }
+        return to;
+    }
+}
\ No newline at end of file

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogout.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogout.java?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogout.java (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogout.java Sat Oct 29 20:49:09 2011
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.shiro.rest;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.cocoon.rest.controller.annotation.Inject;
+import org.apache.cocoon.rest.controller.annotation.RESTController;
+import org.apache.cocoon.rest.controller.annotation.RequestParameter;
+import org.apache.cocoon.rest.controller.method.Get;
+import org.apache.cocoon.rest.controller.response.RedirectResponse;
+import org.apache.cocoon.rest.controller.response.RestResponse;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+
+@RESTController
+public abstract class AbstractShiroLogout implements Get {
+    
+    protected abstract String getDefaultTo();
+
+    @Inject
+    private HttpServletRequest request;
+    
+    @RequestParameter
+    protected String to;
+    public RestResponse doGet() throws Exception {
+        Subject subject = SecurityUtils.getSubject();
+
+        if (subject != null) {
+            subject.logout();
+        }
+
+        HttpSession session = request.getSession(false);
+        if (session != null) {
+            session.invalidate();
+        }
+        return new RedirectResponse(getTo());
+    }
+    protected String getTo() {
+        if(StringUtils.isBlank(to)){
+            return getDefaultTo();
+        }
+        return to;
+    }
+}

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/shiro/rest/AbstractShiroLogout.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/sitemap/expression/ShiroInterpreter.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/sitemap/expression/ShiroInterpreter.java?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/sitemap/expression/ShiroInterpreter.java (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/sitemap/expression/ShiroInterpreter.java Sat Oct 29 20:49:09 2011
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+package org.apache.cocoon.sitemap.expression;
+
+import org.apache.cocoon.sitemap.objectmodel.ObjectModel;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+
+public class ShiroInterpreter implements LanguageInterpreter {
+
+    public String resolve(String expression, ObjectModel objectModel) {
+        Object o = null;
+        Subject subject = SecurityUtils.getSubject();
+        if (expression.equals("authenticated")) {
+            o = subject.isAuthenticated();
+        } else if (expression.equals("principal")) {
+            Object principal = subject.getPrincipal();
+            if (null == principal) {
+                principal = new String("");
+            }
+            o = principal;
+        }
+        return o != null ? o.toString() : "";
+    }
+
+}

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/src/main/java/org/apache/cocoon/sitemap/expression/ShiroInterpreter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/sitemap.xmap?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/sitemap.xmap (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/sitemap.xmap Sat Oct 29 20:49:09 2011
@@ -0,0 +1,30 @@
+<?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.
+-->
+<!-- $Id: sitemap.xmap 697547 2008-09-21 16:52:48Z reinhard $ -->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap" xmlns:servlet="http://apache.org/cocoon/servlet" 
+  xmlns:controller="http://apache.org/cocoon/controller"> 
+
+  <map:pipelines>
+    <map:pipeline>
+      <map:match pattern="">
+        <map:read src="welcome.html" />
+      </map:match>
+    </map:pipeline>    
+  </map:pipelines>
+  
+</map:sitemap>
\ No newline at end of file

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/welcome.html
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/welcome.html?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/welcome.html (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/welcome.html Sat Oct 29 20:49:09 2011
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+  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.
+-->
+<!-- $Id: welcome.html 642116 2008-03-28 08:00:47Z reinhard $ -->
+<html>
+  <head>
+    <title>Welcome</title>
+  </head>
+  <body>
+    <h1>Welcome</h1>
+    <p>You have successfully generated a Cocoon 3 application (org.apache.cocoon.shiro:cocoon-shiro) by using the Cocoon 3 Block Archetype.</p>
+  </body>
+</html>
\ No newline at end of file

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/COB-INF/welcome.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/spring/cocoon-shiro-context.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/spring/cocoon-shiro-context.xml?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/spring/cocoon-shiro-context.xml (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/spring/cocoon-shiro-context.xml Sat Oct 29 20:49:09 2011
@@ -0,0 +1,44 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
+  xmlns:aop="http://www.springframework.org/schema/aop" xmlns:util="http://www.springframework.org/schema/util"
+  xmlns:pipeline="http://cocoon.apache.org/schema/pipeline"
+  xmlns:configurator="http://cocoon.apache.org/schema/configurator"
+  xmlns:context="http://www.springframework.org/schema/context"
+  xsi:schemaLocation="
+  http://cocoon.apache.org/schema/configurator http://cocoon.apache.org/schema/configurator/cocoon-configurator-1.0.1.xsd
+  http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+  http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
+  http://cocoon.apache.org/schema/pipeline http://cocoon.apache.org/schema/pipeline/cocoon-pipeline-1.0.xsd">
+      
+    <!-- Scan for all REST controllers and make them as beans available -->
+  <context:component-scan base-package="org.apache.cocoon.shiro.rest"
+    use-default-filters="false"
+    name-generator="org.apache.cocoon.rest.controller.ControllerBeanNameGenerator"
+    scope-resolver="org.apache.cocoon.rest.controller.ControllerBeanScopeResolver">
+    <context:include-filter type="annotation"
+      expression="org.apache.cocoon.rest.controller.annotation.RESTController" />
+  </context:component-scan>
+  <context:annotation-config />
+  
+  <bean name="expression-language:shiro" class="org.apache.cocoon.sitemap.expression.ShiroInterpreter"/>
+
+</beans>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/spring/cocoon-shiro-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/xpatch/shiro.xweb
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/xpatch/shiro.xweb?rev=1195029&view=auto
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/xpatch/shiro.xweb (added)
+++ cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/xpatch/shiro.xweb Sat Oct 29 20:49:09 2011
@@ -0,0 +1,44 @@
+<?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.
+ -->
+<xweb xpath="/web-app" 
+      unless="comment()[contains(., 'Cocoon Shiro integration')]" 
+      insert-after="filter-mapping[last()]">
+
+  <!-- Cocoon Shiro integration -->
+  <filter>
+    <filter-name>shiroFilter</filter-name>
+    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+    <init-param>
+        <param-name>targetFilterLifecycle</param-name>
+        <param-value>true</param-value>
+    </init-param>
+</filter>
+
+<!-- Make sure any request you want accessible to Shiro is filtered. /* catches all -->
+<!-- requests.  Usually this filter mapping is defined first (before all others) to -->
+<!-- ensure that Shiro works in subsequent filters in the filter chain:             -->
+<filter-mapping>
+    <filter-name>shiroFilter</filter-name>
+    <url-pattern>/*</url-pattern>
+</filter-mapping>
+  <listener>
+    <listener-class>org.apache.cocoon.blockdeployment.BlockDeploymentServletContextListener</listener-class>
+  </listener>
+</xweb>

Propchange: cocoon/cocoon3/trunk/cocoon-shiro/src/main/resources/META-INF/cocoon/xpatch/shiro.xweb
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/cocoon3/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/parent/pom.xml?rev=1195029&r1=1195028&r2=1195029&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/parent/pom.xml (original)
+++ cocoon/cocoon3/trunk/parent/pom.xml Sat Oct 29 20:49:09 2011
@@ -399,6 +399,11 @@
                 </exclusions>
             </dependency>
             <dependency>
+                <groupId>org.apache.shiro</groupId>
+                <artifactId>shiro-spring</artifactId>
+                <version>1.1.0</version>
+            </dependency>
+            <dependency>
                 <groupId>org.codehaus.woodstox</groupId>
                 <artifactId>woodstox-core-asl</artifactId>
                 <version>4.1.1</version>
@@ -532,6 +537,11 @@
                 <version>${project.version}</version>
             </dependency>
             <dependency>
+                <groupId>org.apache.cocoon.shiro</groupId>
+                <artifactId>cocoon-shiro</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>org.apache.cocoon.sitemap</groupId>
                 <artifactId>cocoon-sitemap</artifactId>
                 <version>${project.version}</version>

Modified: cocoon/cocoon3/trunk/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/pom.xml?rev=1195029&r1=1195028&r2=1195029&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/pom.xml (original)
+++ cocoon/cocoon3/trunk/pom.xml Sat Oct 29 20:49:09 2011
@@ -55,6 +55,7 @@
     <module>cocoon-sax</module>
     <module>cocoon-cli</module>
     <module>cocoon-servlet</module>
+    <module>cocoon-shiro</module>
     <module>cocoon-sitemap</module>
     <module>cocoon-stax</module>
     <module>cocoon-stringtemplate</module>
@@ -62,6 +63,7 @@
     <module>cocoon-wicket</module>
     <module>parent</module>
     <module>cocoon-rest-optional</module>
+    <module>cocoon-shiro-sample</module>
   </modules>
 
   <build>
@@ -132,4 +134,4 @@
       </build>
     </profile>
   </profiles>
-</project>
+</project>
\ No newline at end of file



Mime
View raw message