Part of nevow.guard View Source View In Hierarchy
Implements interfaces: nevow.inevow.IResource
SessionWrapper
The following class attributes can be modified on an instance
of the class.
@ivar secureCookies: Whether to use secure (TLS only) cookies or not.
True (default): make cookies secure when session is initiated
in a secure (TLS) connection.
False: cookies do not get the secure attribute.
@ivar: persistentCookies: Whether to use persistent (saved to disk) cookies or not.
True: make cookies persistent, so they are valid for the
length of the sessionLifetime even if the browser window
is closed.
False (default): cookies do not get saved to disk, and thus last
only as long as the session does. If the browser is
closed before the session timeout, both the session
and the cookie go away.
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 259 | Method | __init__ | Undocumented |
| 275 | Method | renderHTTP | Render a request |
| 288 | Method | locateChild | Locate another object which can be adapted to IResource |
| 359 | Method | createSession | Create a new session for this request, and redirect back to the path |
| 387 | Method | checkLogin | Associate the given request with the given session and: |
| 481 | Method | explicitLogout | Hook to be overridden if you care about user-requested logout. |
| 505 | Method | getCredentials | Undocumented |
| 510 | Method | login |
|
| 537 | Method | incorrectLoginError | Used as an errback upon failed login, returns a 2-tuple of a failure URL |
| 559 | Method | authRequiredError | Undocumented |
| Returns |
| |
Hook to be overridden if you care about user-requested logout.
Note: there is no return value from this method; it is purely a way to
provide customized behavior that distinguishes between session-expiry
logout, which is what 99% of code cares about, and explicit user
logout, which you may need to be notified of if (for example) your
application sets other HTTP cookies which refer to server-side state,
and you want to expire that state in a manual logout but not with an
automated logout. (c.f. Quotient's persistent sessions.)
If you want the user to see a customized logout page, just generate a
logout link that looks like
http://your-site.example.com/__logout__/my/custom/logout/stuff
and the user will see
http://your-site.example.com/my/custom/logout/stuff
as their first URL after becoming anonymous again.
| Returns | a Deferred which fires a 2-tuple of the resource returned from my portal's login() and the passed list of segments upon successful login. | |