Hi Luke

We started to implement a very general AccessControlling-Sitemap 
(Authorization and
Authentication)

You can download it from

http://www.wyona.org/download/wyona-cms-2001.12.05-00.11.tar.gz

The package is rather big since Tomcat4.0 and Cocoon2 is included as well.

Unpack it and then you will find the sitemap within the directory:

download/wyona/tomcat/webapps/cocoon/sitemap.xmap

We have not finished yet the AbstractFactory Pattern for loading
your own Authorizer resp. Authenticator, but next week it should be ready.


But the rest is working (more or less).


All the best

Michael




Luke Studley wrote:

>Hi list.
>
>Basically anybody know how to get access in the sitemap to the full context
>for that sitemap? Especially when it is a mounted sub map?
>
>I'm trying to implement some basic login / authentication functionality from
>a sub-sitemap and I have noticed the following.
>
>      <map:match pattern="secure/**.html">
>        <!-- first validate whether user has logged in --> 
>        <map:act type="session-validator">
>          <map:parameter name="descriptor"
>value="context://web//descriptors/params.xml"/>
>          <map:parameter name="validate" value="username"/>
>          <!-- generate protected content -->
>          <map:generate src="docs/secure/{1}.xml"/>
>          <map:transform src="stylesheets/simple-xml2html.xsl"/>
>          <map:serialize/>
>        </map:act>
>        <!-- something was wrong, redirect to login page --> 
>        <map:redirect-to uri="login.html"/>
>      </map:match>
>
>The re-direct to login page takes the context of the URI and not the context
>of the sitemap, which kind of makes sense, but is not very useful
>
>So if the cocoon context is /cocoon
>And my sub sitemap is /web
>
>Then if the user selects 
>/cocoon/web/secure/a/b/c/d/index.html 
>
>They are re-directed to 
>/cocoon/web/secure/a/b/c/d/login.html
>
>whereas I want them to be sent to 
>/cocoon/web/login.html
>
>So I was thinking I need to do something like:
>        <map:redirect-to uri="{sitemap-context}/login.html"/>
>
>Any ideas how to get at such data?
>
>Cheers
>
>Luke
>
>
>
>
>
>
>---------------------------------------------------------------------
>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]>
>
>



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