ARGH, now please tell me what's wrong: When I select a "public" pipeline when I'm logged out, it goes through "protect", notices that I'm not logged in, so it displays the login form. I log in, the user/password is checked and success == true. I should then be redirected to the original page (see request-param:resource in the sitemap), but the 'protected-redirect' parameter in the do-login function stays empty.
When I mailed my previous message, I was under the impression it worked, but it turned out it only works when I'm loggen in already. :-( Since then I've restarted Tomcat, removed all contents of Tomcat/../work directory and did a restart, but nothing helped. Bye, Helma > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Sunday, 16 May 2004 21:42 > To: [EMAIL PROTECTED] > Subject: RE: Problem with losing session context > 'authentication' - lookin g fo r workaround or bugfix > > > Antonio, > > You're the greatest! Thanks for bearing with me. > > I've looked this over, compared it to the version you sent in > a different > mail (and found no significant differences) and finally found > the problem in > the sitemap: > > <map:match pattern="login"> > <map:call function="isLoggedIn"> > <map:parameter name="handler" > value="flowAuthenticationHandler"/> > <map:parameter name="protected-redirect" > value="{request-param:resource}"/> [*] > <map:parameter name="failure-internal" > value="internal/login"/> > </map:call> > </map:match> > > I had a fixed URL at [*]. :-( > > Just for clarity: is there a difference in Javascript between > (object == > undefined) and (object == null)? > > Bye and thanks, Helma > > > -----Original Message----- > > From: Antonio Gallardo [mailto:[EMAIL PROTECTED] > > Sent: Sunday, 16 May 2004 09:34 > > To: [EMAIL PROTECTED] > > Subject: RE: Problem with losing session context > > 'authentication' - looking fo r workaround or bugfix > > > > > > Hi Helma! > > > > I don't forgot to this task! As promised, I found the time > > and started to > > checking the code :-D > > > > I have the posted code in my computer. I just left the code that was > > interesting to me: > > > > [2] login.js > > > > > cocoon.load("resource://org/apache/cocoon/webapps/authenticati > > on/flow/javasc > > > ript/auth.js"); > > > > > > function isLoggedIn() { > > > var handler = cocoon.parameters["handler"]; > > > var resource = cocoon.parameters["resource"]; > > > > > > // resource contains the URL where the request came from, > > so you can > > > redirect to there > > > > > > if (auth_isAuthenticated(handler, resource)) { <---- neither > > > redirection > > > work > > > > the auth_isAuthenticated() allow just 1 parameter. The > > correct code must be: > > > > auth_isAuthenticated(handler). > > > > See the source code: > > http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/bl > ocks/authentication-fw/java/org/apache/cocoon/webapps/authenti > cation/flow/ja > vascript/auth.js?content-type=text%2Fplain&rev=1.9 > > Please try to change it and let me know if this solve the > problem or not. > We can try to solve the problem fixing 1 thing at a time, OK? :) > > Best Regards, > > Antonio Gallardo > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]