[Twisted-Python] HTTP Authentication Example for review

Christopher Armstrong radix at twistedmatrix.com
Wed Jul 16 15:52:49 EDT 2003

On Wed, Jul 16, 2003 at 03:00:26PM -0400, David McCurley wrote:
> The one thing so far that I don't like (ref MyGuard) is that it looks
> like I have to do checks in the following methods (at least):
> render()
> getChild()
> getChildWithDefault()
> getChildForRequest()

No, you only need to override render and
getChildWithDefault. getChildForRequest will call getChildWithDefault,
and getChildWithDefault is responsible for calling getChild. So as
long as you have isLeaf=True, getChildWithDefault will catch any

> class MyAuth(baseRes):
>     isLeaf = True

 Twisted | Christopher Armstrong: International Man of Twistery
  Radix  |          Release Manager,  Twisted Project
---------+     http://twistedmatrix.com/users/radix.twistd/

More information about the Twisted-Python mailing list