[Twisted-Python] Woven subpage handling redirect deferred, Help!?!
Bill Gribble
grib at billgribble.com
Mon Oct 6 08:02:11 MDT 2003
On Mon, 2003-10-06 at 08:43, Syver Enstad wrote:
> Should I use a plain Resource rather than a woven page for this kind
> of problem?
I'm not using PB for auth (homebrew using the app's SQL db) but I think
the general approach could be the same.
I have a separate Resource that is the top-level entry point of the
app. Its getChild method checks that the proper credentials are
associated with the Session and if not redirects to the login page. The
handlers on the login page are responsible for setting up the
credentials in the Session.
This works well for me. The "gatekeeper" Resource is like 20 lines of
code and keeps the page logic from having to know about the
authentication scheme.
b.g.
More information about the Twisted-Python
mailing list