You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bhaskar Rathod <bh...@cs.unm.edu> on 2005/01/12 23:59:54 UTC

Auth-Protect and wildcard matcher

Hello,

I am using auth framework successfully, but recently I am having trouble 
with wildcard pattern matchers and auth-protect action.

My pipeline matcher is as follows:

     <map:match pattern="*.xml">
       <map:act type="auth-protect">
            <map:parameter name="handler" value="LoginHandler"/>
    
         <map:read mime-type="text/html" src="submissions/{1}.xml"/>
         <map:serialize type="text"/>
       </map:act>

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

However, the src received by map:read (the parameter {1}) is empty. If I 
remove authentication altogether, things work fine.
ie
     <map:match pattern="*.xml">
       <map:read mime-type="text/html" src="submissions/{1}.xml"/>
       <map:serialize type="text"/>
     </map:match>

Then the parameter  {1} resolves correctly.

Any Ideas appreciated.

Kind regards,

Bhaskar


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


Re: Auth-Protect and wildcard matcher

Posted by Bhaskar Rathod <bh...@cs.unm.edu>.
Mark Lundquist wrote:

>>From: Bhaskar Rathod [mailto:bhaskar@cs.unm.edu]
>>
>>So conceptually, if we nest blocks (of action or resource calls or 
>>anything nestable?) in a pattern matcher, all the references to the 
>>pattern should be resolved with relative path from the actual level to 
>>the pattern. Ie if I nest another action, and try to use matched 
>>pattern, I shoud refer to it as {../../1}. Is that a correct 
>>interpretation?
>>    
>>
>
>Yup.  Same goes for nested matchers.
>  
>
>>Does this apply to XML in general or just the cocoon sitemap?
>>    
>>
>
>Just the Cocoon sitemap.
>  
>
Great. Thanks.

I should have read closely on the cocoon site. It is right there in the 
Actions FAQ section (http://cocoon.apache.org/2.1/faq/faq-actions.html).

Kind regards,
Bhaskar



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


RE: Auth-Protect and wildcard matcher

Posted by Mark Lundquist <ml...@wrinkledog.com>.

> From: Bhaskar Rathod [mailto:bhaskar@cs.unm.edu]
> 
> So conceptually, if we nest blocks (of action or resource calls or 
> anything nestable?) in a pattern matcher, all the references to the 
> pattern should be resolved with relative path from the actual level to 
> the pattern. Ie if I nest another action, and try to use matched 
> pattern, I shoud refer to it as {../../1}. Is that a correct 
> interpretation?

Yup.  Same goes for nested matchers.

> 
> Does this apply to XML in general or just the cocoon sitemap?

Just the Cocoon sitemap.


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


Re: Auth-Protect and wildcard matcher

Posted by Bhaskar Rathod <bh...@cs.unm.edu>.
Thanks Adam. I appreciate it. I changed it accordingly, and it works.

So conceptually, if we nest blocks (of action or resource calls or 
anything nestable?) in a pattern matcher, all the references to the 
pattern should be resolved with relative path from the actual level to 
the pattern. Ie if I nest another action, and try to use matched 
pattern, I shoud refer to it as {../../1}. Is that a correct 
interpretation?

Does this apply to XML in general or just the cocoon sitemap?

Thanks again.

Kind regards,
Bhaskar

Adam Ratcliffe wrote:

>Hi Bhaskar
>
>Because the variable that you're trying to access within your action belongs
>to the enclosing
>matcher and not the action itself you need to reference it as {../1}.
>
>HTH
>Adam
>
>-----Original Message-----
>From: Bhaskar Rathod [mailto:bhaskar@cs.unm.edu]
>Sent: Thursday, 13 January 2005 12:00 p.m.
>To: users@cocoon.apache.org
>Subject: Auth-Protect and wildcard matcher
>
>
>Hello,
>
>I am using auth framework successfully, but recently I am having trouble
>with wildcard pattern matchers and auth-protect action.
>
>My pipeline matcher is as follows:
>
>     <map:match pattern="*.xml">
>       <map:act type="auth-protect">
>            <map:parameter name="handler" value="LoginHandler"/>
>
>         <map:read mime-type="text/html" src="submissions/{1}.xml"/>
>         <map:serialize type="text"/>
>       </map:act>
>
>       <map:redirect-to uri="login"/>
>     </map:match>
>
>However, the src received by map:read (the parameter {1}) is empty. If I
>remove authentication altogether, things work fine.
>ie
>     <map:match pattern="*.xml">
>       <map:read mime-type="text/html" src="submissions/{1}.xml"/>
>       <map:serialize type="text"/>
>     </map:match>
>
>Then the parameter  {1} resolves correctly.
>
>Any Ideas appreciated.
>
>Kind regards,
>
>Bhaskar
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>  
>


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


RE: Auth-Protect and wildcard matcher

Posted by Adam Ratcliffe <ad...@mrigitech.com>.
Hi Bhaskar

Because the variable that you're trying to access within your action belongs
to the enclosing
matcher and not the action itself you need to reference it as {../1}.

HTH
Adam

-----Original Message-----
From: Bhaskar Rathod [mailto:bhaskar@cs.unm.edu]
Sent: Thursday, 13 January 2005 12:00 p.m.
To: users@cocoon.apache.org
Subject: Auth-Protect and wildcard matcher


Hello,

I am using auth framework successfully, but recently I am having trouble
with wildcard pattern matchers and auth-protect action.

My pipeline matcher is as follows:

     <map:match pattern="*.xml">
       <map:act type="auth-protect">
            <map:parameter name="handler" value="LoginHandler"/>

         <map:read mime-type="text/html" src="submissions/{1}.xml"/>
         <map:serialize type="text"/>
       </map:act>

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

However, the src received by map:read (the parameter {1}) is empty. If I
remove authentication altogether, things work fine.
ie
     <map:match pattern="*.xml">
       <map:read mime-type="text/html" src="submissions/{1}.xml"/>
       <map:serialize type="text"/>
     </map:match>

Then the parameter  {1} resolves correctly.

Any Ideas appreciated.

Kind regards,

Bhaskar


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




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