Hi Greg
What is your real problem? I don't know if is your case, but Internet
Explorer doesn't save cookies if you are on a frame (in my case an
iframe). I need to use AutomaticPathSession=1 on the configuration.
If I open the frame on a new window all is ok...
seeya
On Thu, 31 Mar 2005 00:35:09 -0800, Greg McClure <[EMAIL PROTECTED]> wrote:
> Argh.
>
> I tried it, but unfortunately trans.hasSession() doesn't seem to be
> solving my problem.
>
> Here's a sample of my code, as per your suggestion:
>
> import lib.Config
> from BasicFrame import BasicFrame
>
> class AuthFrame(BasicFrame):
> def awake(self, trans):
> BasicFrame.awake(self, trans)
>
> if not trans.hasSession():
> try:
> self.session().setValue('target', self.request().uri())
> self.response().sendRedirect('login')
> except:
> self.writeln('Could not create authenticated session.')
>
> If there is no session cookie, as there is not after I've forcibly
> deleted it, I want any request to a page inheriting AuthFrame to go to
> my login page. I apologize if I'm missing something really plain but
> I've done this sort of thing before so I'm really confused.
>
> On Wed, 30 Mar 2005 16:26:10 -0500, Geoffrey Talvola
> <[EMAIL PROTECTED]> wrote:
> > Greg McClure wrote:
> > > I need to detect if the session cookie is present or not, *before* the
> > > rest of a page executes. Right now my protected pages are inheriting
> > > from an AuthFrame class which uses the awake method to handle this
> > > stuff. I have caching turned off.
> >
> > How about self.transaction().hasSession() -- does that meet your needs?
> >
> > - Geoff
> >
>
> -------------------------------------------------------
> This SF.net email is sponsored by Demarc:
> A global provider of Threat Management Solutions.
> Download our HomeAdmin security software for free today!
> http://www.demarc.com/info/Sentarus/hamr30
> _______________________________________________
> Webware-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
--
Michel Thadeu Sabchuk
Curitiba - Brasil
-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
Webware-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/webware-discuss