[Twisted-Python] htpasswd / HTTP basic auth example

Glyph Lefkowitz glyph at twistedmatrix.com
Mon Jul 21 06:36:49 EDT 2003

On Sunday, July 20, 2003, at 08:27 PM, Andrew Bennetts wrote:

> This reminds me -- I wrote a simple resource wrapper recently that 
> provides
> HTTP basic auth, reading from a htpasswd(1) file [currently it only 
> supports
> crypt'ed passwords, not MD5].  This doesn't use guard (or even 
> newcred) at
> all, although it probably should.

Actually, it ought to use newcred and be a part of guard.  HTTP auth is 
really a funky way of establishing a session.  It works totally 
differently from guard's SessionWrapper, but you get the same effect - 
this implementation detail would ideally be specified by some kind of 
configuration rather than by the application author directly, but, uh 
... coil :).

In short, if someone is going to enhance this to support newcred, don't 
get too hung up on the way the existing woven.guard stuff works :).

More information about the Twisted-Python mailing list