Part of nevow.inevow View Source View In Hierarchy
A web session
You can locate a Session object to represent a unique web session using ISession(ctx). This default session implementation uses cookies to store a session identifier in the user's browser.
uid: Session uid
TODO: Need better docs; what's a session and why and how do you use it| Line # | Kind | Name | Docs |
|---|---|---|---|
| 219 | Method | setLifetime | Set the approximate lifetime of this session, in seconds. |
| 231 | Method | notifyOnExpire | Call this callback when the session expires or logs out. |
| 235 | Method | expire | Expire/logout of the session. |
| 239 | Method | touch | Refresh the session |
Inherited from IComponentized:
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 157 | Method | setComponent | Add a component to me for the indicated interface. |
| 162 | Method | addComponent | Add a component to me, for all appropriate interfaces. |
| 179 | Method | getComponent | Create or retrieve an adapter for the given interface. |
| 196 | Method | unsetComponent | Remove my component specified by the given interface class. |
| 199 | Method | removeComponent | Remove the given component from me entirely, for all interfaces for which |
Set the approximate lifetime of this session, in seconds.
This is highly imprecise, but it allows you to set some general parameters about when this session will expire. A callback will be scheduled each 'lifetime' seconds, and if I have not been 'touch()'ed in half a lifetime, I will be immediately expired.
If you need to change the lifetime of all the sessions change sessionsLifeTime attribute in class guard.SessionWrapper