[Twisted-Python] how to implement login form logic with twisted.cred checkers, credentials and portal
On Mar 2, 2016, at 6:32 AM, snailcoder <snailcoder@163.com> wrote:
I'm trying to implement some login logic using twisted.cred module for a website. In short, there's a login page with username/password forms. Once the user input the right username/password, the browser will redirect to another page which includes the user's profile.
Does anyone have any ideas about how to implement this logic with twisted.cred checkers, credentials and portal? Any suggestion is appreciated :-)
Sorry for the long delay. I kept wanting to give this a more elaborate response. There's an example of doing this - sort of - in Nevow, here: https://github.com/twisted/nevow/blob/master/nevow/guard.py <https://github.com/twisted/nevow/blob/master/nevow/guard.py>. It's not perfectly equivalent because it uses Nevow's slightly-incompatible IResource interface, and not Twisted's IResource. Have you tried anything and gotten stuck or were you just curious about how it might be done? I've filed a ticket here: https://twistedmatrix.com/trac/ticket/8248 <https://twistedmatrix.com/trac/ticket/8248> since this functionality should be in Twisted. -glyph
participants (2)
-
Glyph
-
snailcoder