Hello,
I use sunrise framework.
I'd like to protected multiple patterns but I don't know how.
Here is what I tried :
<!-- the handle -->
...
<map:action name="sunRise_auth"
src="org.apache.cocoon.sunshine.sunrise.acting.AuthAction">
<handlers>
<handler name="foo_handler"
xmlns:map="http://apache.org/cocoon/sitemap/1.0"
xmlns:sunshine="http://sunshine.sundn.de/sunshine/1.0">
<redirect-to uri="cocoon://login_page"/>
<authentication uri="cocoon:raw://authuser"/>
</handler>
</handlers>
</map:action>
...
<!-- the protected resources -->
<map:match pattern="protected*">
<map:act type="sunRise_auth">
<map:parameter name="handler" value="foo_handler"/>
<!-- welcome page -->
<map:match pattern="display">
<map:generate type="serverpages" src="demo/display.xsp"/>
<map:transform type="xslt" src="demo/display.xsl"/>
<map:serialize type="html"/>
</map:match>
<!-- another page -->
<map:match pattern="page1">
<map:generate type="serverpages" src="demo/page1.xsp"/>
<map:transform type="xslt" src="demo/page1.xsl"/>
<map:serialize type="html"/>
<map:match>
</map:act>
</map:match>
<!-- the login which call authuser via the handler -->
<map:match pattern="login">
<!-- check if the user is logged -->
<map:act type="sunRise_loggedIn">
<map:parameter name="handler" value="foo_handler"/>
<map:redirect-to uri="protecteddisplay"/> => this redirection
doesn't work, the brower says "resource not found"
</map:act>
<!-- log the user -->
<map:act type="sunRise_login">
<map:parameter name="handler" value="foo_handler"/>
<map:parameter name="parameter_name" value="request:name"/>
<map:parameter name="parameter_password" value="request:password"/>
<!-- if the authentication is successfull then this redirect
will be performed -->
<map:redirect-to uri="demo"/>
</map:act>
<!-- authentication failed -->
<map:generate src="demo/login_failed.xml"/>
<map:transform src="demo/login_failed.xsl"/>
<map:serialize type="html"/>
</map:match>
Someone has an idea ?
Thanks in advance
Lionel
---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>
- RE: Multiple matches in a protected resource Lionel Crine
- RE: Multiple matches in a protected resource Carsten Ziegeler