[Twisted-web] HTTPAuthSessionWrapper render

Jean-Paul Calderone exarkun at divmod.com
Wed Jul 1 17:19:50 EDT 2009


On Wed, 1 Jul 2009 13:34:41 -0700, Jared Gisin <jared.gisin at isilon.com> wrote:
>Yes, I can file a bug.
>
>Is there a reason why this HTTPAuthSessionWrapper isn't a mixin for
>resource.Resource?

As a mixin, what functionality would it be providing?

The functionality it provides now is that arbitrary resources can be
protected by HTTP authentication without being modified.  I can't quite
see how a mixin achieve that goal.

>I've shoehorned it into my own custom subclass of
>resource.Resource that could easily be done as a mixin (though not Ideal
>due to MRO problem if it's in the wrong order). Better would be to
>provide a proper HTTPAuthResource that does it. Thoughts?

I'm not really sure what you mean here.  You actually mixed
HTTPAuthSessionWrapper into a Resource subclass and got it to do something?
That's surprising, and not the intended use. :)

Jean-Paul



More information about the Twisted-web mailing list