Yes, I know that pipelines are executed in the order I set them in the
sitemap. Actually, the login/logout targets are in a pipeline before the
protected pipeline. It seems to work correctly, I don't see any real
problem... Performance, maybe? But I don't think so...
Wow, that's all new to me, I'm usually commited to have them fixed, not
finding them :o)
Ok, I'll grab the CVS version when I have a bit of time, I'm doing it with
the other way right now to have my experiment go on.
Thanks again,
Pascal.
-----Original Message-----
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 2:05 AM
To: [EMAIL PROTECTED]
Subject: RE: [Action] Best practices for authentication
> From: Pascal Davoust [mailto:[EMAIL PROTECTED]]
>
> 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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>