I am trying to implement a authentication method. It seems that Sitemap
Parameters are not inherited to selectors inside others... this is my
code (look for {auth_role_page} in the <map:otherwise>):

<map:match pattern="cocoon_security_check">
<!-- first validate whether submitted values are ok -->
        <map:act type="form-validator">
                <map:parameter name="descriptor"
value="context://protected/descriptors/login_form.xml"/>
                <map:parameter name="validate" value="cocoon_username"/>
                <!-- now try to log in -->
                <map:act type="db-authenticator">
                        <map:parameter name="descriptor"
value="context://protected/descriptors/login_db.xml"/>
                        <!-- if a customer logged in, then check the
room_id -->
                        <map:select type="session">
                                <map:parameter name="state-key"
value="auth_role"/>
                                <map:when test="customer">
                                        <map:act
type="db-authenticator">
                                                <map:parameter
name="create-session" value="no"/>
                                                <map:parameter
name="descriptor"
value="context://protected/descriptors/login_rooms.xml"/>
        
<!-- redirect to default page  -->
                                                <map:redirect-to
uri="{auth_role_page}"/>
                                        </map:act>
                                        
                                        <!-- something was wrong, try it
again -->
                                        <map:act
type="session-invalidator">
                                                <map:redirect-to
uri="login"/>
                                        </map:act>
                                </map:when>
                                                        
                                <map:otherwise>
                                        <!-- redirect to default page
-->
                                        <map:redirect-to
uri="{auth_role_page}"/>
                                </map:otherwise>
                        </map:select>
                </map:act>
        </map:act>
        <!-- something was wrong, try it again -->
        <map:redirect-to uri="login"/>
</map:match>

Then, my questions:
1) is it possibile to propagate Sitemap parameters into child elements
of sitemap?
2) is it possibile to check and propagate session attributes to Sitemap
without deleting an existing session?
3) is it possibile to specify a sitemap-relative path as descriptor
parameter to the database authenticator action?

ByeBye,
Paolo Scaffardi
AIRVENT SAM S.p.A.



---------------------------------------------------------------------
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]>

Reply via email to