cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From H.vanderLin...@MI.unimaas.nl
Subject RE: Problem with losing session context 'authentication' - lookin g fo r workaround or bugfix
Date Sun, 16 May 2004 20:48:36 GMT
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: H.vanderLinden@MI.unimaas.nl 
> [mailto:H.vanderLinden@MI.unimaas.nl] 
> Sent: Sunday, 16 May 2004 21:42
> To: users@cocoon.apache.org
> 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:agallardo@agssa.net] 
> > Sent: Sunday, 16 May 2004 09:34
> > To: users@cocoon.apache.org
> > 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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message