cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Z.Z." <za...@vili.pmmf.hu>
Subject multiple documents with Authentication-fw
Date Sun, 22 Feb 2004 13:43:11 GMT
Hi All,

I'm new in cocoon :-)
I applied authentication-fw based samples/authentication-fw. 
It works good, but I need to use it with multiple documents. 
I modified my protected entry in sitemap.xmap based on 
http://cocoon.apache.org/2.1/developing/webapps/authentication.html

originap snippet is:

     <map:match pattern="protected">
        <map:act type="auth-protect">
          <map:parameter name="handler" value="demohandler"/>

          <map:generate src="docs/protected.xml"/>
          <map:transform type="session"/>
          <map:transform src="stylesheets/simple-page2html.xsl"/>
          <map:transform type="encodeURL"/>
          <map:serialize/>
        </map:act>
        <!-- something was wrong, redirect to login page -->
        <map:redirect-to uri="login"/>
      </map:match>

my modified snippet is:

   <map:match pattern="protected-**">
     <map:act type="auth-protect">
       <map:parameter name="handler" value="portalhandler"/>

       <map:match pattern="protected-*.pdf">
          <map:read mime-type="application/pdf" src="{1}.pdf"/>
          <map:transform type="session"/>
       </map:match>

       <map:match pattern="protected-orig">
         <map:generate src="docs/protected.xml"/>
         <map:transform type="session"/>
         <map:transform src="../style/simple-page2html.xsl"/>
         <map:transform type="encodeURL"/>
         <map:serialize/>
       </map:match>
     </map:act>
     <!-- something was wrong, redirect to login page -->
     <map:redirect-to uri="login"/>
   </map:match>

It is working good, when I logged in, but after login it redirect to: 
"protected" link, which is not exists.

How can I pass {1} parameter to login?

-- 
thx,
----------------------------------------------------
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message