[Twisted-Python] Twisted.web, txOAuth and custom login pages

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Tue Aug 24 08:20:29 EDT 2010

On 10:57 am, lvh at laurensvh.be wrote:
>I'm writing txOAuth. Basically the idea is to abstract all the OAuth 
>away so that people can just do boring old web auth.
>I've also found sources on how to do it with Woven, but I'm pretty sure 
>not supposed to do that anymore. Some of them refer to Nevow as the 
>new thing to use, but since I'm not trying to actually BUILD such a 
>page (I'm merely trying to cater to other people that do), I don't 
>think I
>need it.

Even if you don't want to generate HTML, nevow.guard is an example of 
the rest of the authentication process (tied in to cred) from an HTML 
form.  So you still might want to take a look.  Not that it's extremely 
pretty... But it has lots of real-world use and does what people want.
>I'm not sure how much of the default stuff can be reused, because OAuth 
>is a
>bit different: authenticating the end-user (that's you!) relies on
>redirection. Unfortunately the login page itself might redirect the 
>many times already, so there must be some way of getting back to my 
>with a redirectable request
>Also I'm not sure if I should be using Cred here or if it's just
>complicating stuff.

I don't know if it's complicating things or not.  But using cred is a 
*feature* you provide people.  It means that your OAuth code is easier 
to use in their applications.  So it might be worth the extra work to 
figure out how to make them fit together.


More information about the Twisted-Python mailing list