[Twisted-Python] Woven subpage handling redirect deferred, Help!?!

Syver Enstad syver at inout.no
Mon Oct 6 07:43:10 MDT 2003


As I was saying on the list I am making a login system with woven, and
the way to autheticate the user is by doing a pb call. 

So I thought one way to do it would be to:

Have a root page that displays a login form, on postback make a
pb.IdentityConnector and call requestService to obtain a reference or
onErrback report back to the user that the login attempt failed.

I have tried two approaches...

Put the login in the wchild or
getDynamicChild methods on the login page:

This seems okay because it is easy to redirect to the login page if
the login fails, but it seems to have no support for deferreds and I
don't know if the user is correctly logged in or not until I get a
callback on the deferred returned from pb.

Put the login on the only place I know that accepts deferreds, in the
a wmfactory_ method on the login page:

I get the deferred result okay but I don't know how to do a redirect
from there.

Should I use a plain Resource rather than a woven page for this kind
of problem?






More information about the Twisted-Python mailing list