cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: [Action] Best practices for authentication
Date Thu, 14 Feb 2002 01:04:44 GMT
> From: Pascal Davoust [mailto:davoustp@yahoo.com]
> 
> Mmh, I probably missed something here... I tried what you proposed,
but I
> get a compilation error. Here's what I did at first, which works
correctly:
> 
> <map:pipeline>
>   <map:match pattern="account">
>     <!-- Makes sure that authentication has been successful -->
>     <map:act type="session-validator">
>       <map:parameter name="descriptor"
>            value="file://config/session-params.xml"/>
>       <map:parameter name="validate" value="user/login"/>
> 
>       <!-- The protected content for that match -->
>     </map:act>
>   </map:match>
> </map:pipeline>
> 
> (login is in another pipeline... does it matter?)

(no, but order might be of importance: pipelines are executed one by
one)

 
> And then I tried to reverse the pattern, like this:

Congratulations, you found a bug :)
Remove <map:parameter>:

> <map:pipeline>
>   <!-- Makes sure that authentication has been successful -->
>   <map:act type="session-validator">
> 
>     <map:match pattern="account">
>       <!-- The protected content for that match -->
>     </map:match>
>   </map:act>
> </map:pipeline>
> 
> And I get an error, which is :
> Error compiling sitemap_xmap: Line 901, column 6: Undefined variable:
param

And it will compile.

 
> I had a look to the source code, it's obviously missing the variable
> declaration. Did I forget something here?
> 
> By the way, I found that the "context://..." specifier as a parameter
value
> for the action descriptor doesn't work

Don't remember action sources... It just might be they do not use
resolver to get descriptor.


> (did I correctly understand that this
> sub-protocol is related to the sitemap?),

Any (sub) protocol can be used throughout the system if using resolver.

PS: Grab CVS version of sitemap.xsl - it has the bug fixed.

Regards,
Vadim

> whereas "file://...." does the
> trick (I want to specify a path relative to the sitemap its written
into).
> 
> Thanks,
> 
> 			Pascal.


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message