You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jasper Michalczik <ja...@gmx.net> on 2004/06/17 14:59:58 UTC

authentication

Hello,

 

I'd like to have several different contents in one single Cocoon
application. The Root of my Tomcat is the Cocoon webapp, and all the
content has to be received from a webdav folder, even the authentication
data (the users).

 

Currently I'm having different Cocoon webapps in the Tomcat Webapps
directory, but it came out that this way it makes it really slow. So I
wanted to reduce it to one Cocoon, which should "know" about which url
was called (e.g. localhost/content1) and receive all the data form the
webdav/content1 dir. It worked successfully when I had several Cocoon
webapps running, but somehow I have no idea - and that's the problem -
how to tell the authentication handler which userlist to use to
authenticate.

 

Here are some parts of my sitemap:

 

                    <authentication-manager>

                           <handlers>

                                 <handler name="authhandler">

                                        <redirect-to
uri="http://localhost/{request:contextPath}"/>

                                        <authentication
uri="cocoon:raw:/authenticate/{1}"/>

                                 </handler>

                           </handlers>

                    </authentication-manager>

 

                    <map:match pattern="do-login/*">

                           <!-- try to login -->

                           <map:act type="auth-login">

                                 <map:parameter name="handler"
value="authhandler"/>

                                 <map:parameter name="parameter_name"
value="{request-param:username}"/>

                                 <map:parameter
name="parameter_password" value="{request-param:password}"/>

                                 <map:redirect-to
uri="{1}/content/imprint"/>

                           </map:act>

                           <!-- something was wrong, try it again -->

                           <map:redirect-to uri="login"/>

                    </map:match>

 

             <map:pipeline internal-only="true">

                    <!-- This is the authentication respource -->

                    <map:match pattern="authenticate/*">

                           <map:generate
src="../webdav/{1}/content/userlist.xml"/>

                           <map:transform src="login/authenticate.xsl">

                                 <map:parameter
name="use-request-parameters" value="true"/>

                           </map:transform>

                           <map:serialize type="xml"/>

                    </map:match>

             </map:pipeline>