cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject authentication-fw with flow: redirect does not work
Date Mon, 09 Feb 2004 09:34:00 GMT

I've seen this error report several times with some of you replying they
have solved the problem, but I cannot get mine solved with all the
suggestions given.

Problem: when I access a page in my webapp that is "protected" I should be
redirected to my login page. When following the flow script I see it tries
to redirect to the correct page, but fails.

In detail [1]:
When I call the login page directly (localhost:8888/myproject/login) I'm
correctly redirected to internal/login, I can login and I end up in the
appropriate page (searchperson). When I call a "protected" page (e.g. it
should follow the "redirect-to" uri, but this goes wrong somewhere. Either
the link is one level too deep
(localhost:8888/myproject/person/internal/login) or one level too "low"
(localhost:8888/internal/login) depending on the number of / I add.

when I change the redirect to: <redirect-to uri="/myproject/login" /> it
works. But I prefer not to include the name of my projectdir in the sitemap.

Does anyone have any idea?

Thanks and bye, Helma

cocoon 2.1.4-dev updated from CVS this morning around 9:30
my webapp is a subdir of the default webapp dir. I keep the original sitemap
around for the default declarations etc. There is no modification in the
original sitemap. My project is called as http://localhost:8888/myproject/

my login.js is a copy of the auth-fw sample.js (as updated by Antonio
Gallardo over the weekend)
it calls auth.js as present in the CVS

Relevant Sitemap.xmap snippets:

          <handler name="flowAuthenticationHandler">
            <!-- redirect-to uri="cocoon:/login"/ -->
            <redirect-to uri="cocoon:/internal/login" />
            <authentication uri="cocoon:raw:/authenticate"/>

      <map:match pattern="login">
        <map:call function="isLoggedIn">
          <map:parameter name="handler" value="flowAuthenticationHandler"/>
          <map:parameter name="protected-redirect"
          <map:parameter name="failure-internal" value="internal/login"/>

      <map:match pattern="person/*">
        <map:call function="protect">
          <map:parameter name="handler" value="flowAuthenticationHandler"/>
          <map:parameter name="protected-internal" value="internal/{1}"/>
          <map:parameter name="failure-redirect" value="login"/>
          <map:parameter name="failure-error" value="Log in first"/>

    <map:pipeline internal-only="true">
      <map:match pattern="internal/login">
        <map:generate src="content/main.xml"/>
        <map:transform type="encodeURL"/>
        <map:call resource="html-layout"/>

Helma van der Linden
Medical Informatics
University Maastricht
6200 MD Maastricht
The Netherlands 

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

View raw message