cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <>
Subject Multiple matches in a protected resource
Date Fri, 31 Jan 2003 10:23:19 GMT
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" 
         <handler name="foo_handler" 
	  <redirect-to uri="cocoon://login_page"/>
	  <authentication uri="cocoon:raw://authuser"/>

<!-- 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"/>

		<!-- 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"/>


<!-- 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"
	    <!-- 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"/>
	    <!-- authentication failed -->
	    <map:generate src="demo/login_failed.xml"/>
	    <map:transform src="demo/login_failed.xsl"/>
	    <map:serialize type="html"/>

Someone has an idea ?

Thanks in advance

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message