Try

<map:match type="wildcard" pattern="secure/**">
        <map:act type="auth-protect">
                <map:parameter name="handler" value="{global:handler}"/>
                <!-- logout function -->
                <map:match type="wildcard" pattern="secure/logout">
                        <map:call function="logout">
                                <map:parameter name="handler" 
value="{global:handler}"/>
                        </map:call>
                </map:match>
                <!-- flowscripts -->
                <map:match type="wildcard" pattern="secure/*.flow">
                        <map:call function="{1}"/>
                </map:match>
        </map:act>
        <map:redirect-to uri="login"/>
</map:match>

If the auth-protect action fails the <map:redirect-to uri="login"/> will be executed otherwise only what is contained within the action will be executed.

Joe

Markus Heussen wrote:

Hi all!

If I call my following protected pipeline the result is a 404 page not found
error. I thought the right behavior is to redirect automatically to the
login resource??

Is it a bug or am I doing something wrong? I am using Cocoon from the few
days old CVS Head under SDK1.4.2 and TC 4.1.30.

Thanks for helping, Markus


<map:match type="wildcard" pattern="secure/**"> <map:act type="auth-protect"> <map:parameter name="handler" value="{global:handler}"/> <!-- logout function --> <map:match type="wildcard" pattern="secure/logout"> <map:call function="logout"> <map:parameter name="handler" value="{global:handler}"/> </map:call> </map:match> <!-- flowscripts --> <map:match type="wildcard" pattern="secure/*.flow"> <map:call function="{1}"/> </map:match> </map:act> </map:match>


The authentication declaration looks like the following:


<authentication-manager>
        <global-variables>
                <handler>myapp</handler>
        </global-variables>
        <handlers>
                <handler name="myapp">
                        <redirect-to uri="cocoon:/login"/>
                        <authentication uri="cocoon:raw:/auth"/>
                </handler>
        </handlers>
</authentication-manager>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to