cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans>
Subject Re: authentication framework and continuations
Date Sat, 16 Oct 2004 14:17:14 GMT
> In my login screen, on submit, I call a login.js that
> authenticates the user in the database, and as a
> result of the db call, creates a user bean.
> I simply put that user bean into the session using the
> following:
>     cocoon.session.setAttribute('userBean' ,
> userBean);
> then, on every js, I check to see if the session has
> the bean 
> var userBean = cocoon.session.get('userBean');
> If the user is authenticated the userBean should be
> validated else, I redirect the user to the login page.
>  If the user has already logged in, and the session is
> still alive, and would get the requested protetected
> page seamlessly.
> I then don't have to mess around with the sitemap
> adding protections etc., the single js library
> function does it for me.

Shame though that you didn't get it to work, my setup is very similar 
and runs smoothly. I remember now i had the same problem once where 
cocoon was going crazy and kept looping somewhere. Sadly, i can't 
remember what i did to trigger this or what i did to fix this :(

FYI, you can use cocoon.log.debug() to print debug statements in flow.
This can help seeing where cocoon jumps in and out of the flowscript 
while displaying forms.


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

View raw message