You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alex Romayev <ro...@yahoo.com> on 2002/11/06 14:36:37 UTC
Authenication FW: Protecting multiple resources
Hello,
I'm still struggling with trying to protect multiple
resources using authentication framework. I've
modified the sitemap in the authentication-fw sample
to use wildcard match (see the examples below), but
either I'm not using it correctly, or there is a bug
in the framework.
<!-- ================ -->
<!-- Protected area -->
<!-- ================ -->
<map:match pattern="*">
<map:act type="auth-protect">
<map:parameter name="handler"
value="demohandler"/>
<map:generate src="docs/{1}.xml"/>
<map:transform
src="stylesheets/simple-page2html.xsl"/>
<map:transform type="encodeURL"/>
<map:serialize/>
</map:act>
<!-- something was wrong, redirect to login page -->
<map:redirect-to uri="login"/>
</map:match>
<!-- ========================================= -->
<!-- Form target which performs auth service -->
<!-- ========================================= -->
<map:match pattern="do-login">
<!-- try to login -->
<map:act type="auth-login">
<map:parameter name="handler"
value="demohandler"/>
<map:parameter name="parameter_name"
value="{request-param:username}"/>
<!-- ????????????????????????????????????????? -->
<!-- This is what I think it should be -->
<!-- ????????????????????????????????????????? -->
<map:redirect-to
uri="context://{request-param:resource}"/>
</map:act>
<!-- something was wrong, try it again -->
<map:redirect-to uri="login"/>
</map:match>
However, when I click on "protected" link, rather than
being re-directed to
http://localhost:8080/cocoon/samples/authentication-fw/protected
I get a re-direct to
http://localhost:8080/cocoon/samples/authentication-fw/do-login.
Is this not how the "resource" parameter was intended
to be used?
Thanks,
-Alex
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>