List Info

Thread: Cherrypy 2.2 and session management




Cherrypy 2.2 and session management
user name
2007-01-30 12:16:35
To All

Does anyone know of a consistent way to delete or expire a
session 
created with authentication, that would cause the cached
session id on 
the client browser to be invalid thus requiring our cherrypy
app to 
present another authentication dialog ?

We have a custom method to check for a valid session on all
pages, and 
if it isn't valid, require another HTTP authentication.

Currently the only way for a session to expire/delete is to
have it 
time out.

We have tried manipulating the session timeout config option
as well 
as emptying the cherrpy.session object, with no success.

Thanks in advance for any advise or ideas

Sincerely

Nathen Hinson
Programmer
The Brian Group LLC


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---


Re: Cherrypy 2.2 and session management
user name
2007-01-30 16:17:35


On Jan 30, 10:16 am, "nathen.hin...gmail.com" 
<nathen.hin...gmail.com> wrote:
> To All
>
> Does anyone know of a consistent way to delete or
expire a session
> created with authentication, that would cause the
cached session id on
> the client browser to be invalid thus requiring our
cherrypy app to
> present another authentication dialog ?
>
> We have a custom method to check for a valid session on
all pages, and
> if it isn't valid, require another HTTP
authentication.
>
> Currently the only way for a session to expire/delete
is to have it
> time out.
>
> We have tried manipulating the session timeout config
option as well
> as emptying the cherrpy.session object, with no
success.
>
> Thanks in advance for any advise or ideas
>
> Sincerely
>
> Nathen Hinson
> Programmer
> The Brian Group LLC

Have you tried this at the time of a successful logout:
  cherrypy.response.simple_cookie['_id']['expires'] = 0
where _id is the cookie that keeps track of the session.

This will not work when users close browsers without
explictely "logging-out" of the app...

Hope that works.
/venkat


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )