You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Zamek <za...@vili.pmmf.hu> on 2004/02/24 17:22:48 UTC

I don´t understand authentication of multiple documents

Hello All,

Single document protection is working well, but I need to protect a lot of 
documents:

  <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:act>
     <!-- something was wrong, redirect to login page -->
     <map:redirect-to uri="login"/>
   </map:match>
  
Action of my forms send a request to do-login with username, and if it 
successful it redirect to a predefined uri:

  <map:match pattern="do-login">
      <!-- try to login -->
      <map:act type="auth-login">
        <map:parameter name="handler" value="portalhandler"/>
        <map:parameter name="parameter_name" 
value="{request-param:username}"/>

        <map:redirect-to uri="protected"/>   <----------- here is a 
predefined redirect address

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

How can I redirect it to the correct uri which was requested like 
protected-*?
 

-- 
thanks,
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