[Twisted-Python] Re: Questions about the Perspective Broker login mechanism

Jean-Paul Calderone exarkun at divmod.com
Sun Aug 19 16:48:46 EDT 2007


On Sun, 19 Aug 2007 16:37:01 -0400, David Bolen <db3l.net at gmail.com> wrote:
> [snip]
>
>So, feel free to have at it.  There are probably a few ways you could
>take control, but I were doing it, I'd probably take my Portal
>subclass and make it directly implement IPBRoot (thus avoiding the
>registered adapter _PortalRoot).  Then use the existing classes
>(_PortalWrapper, _PortalAuthChallenger) as a model and/or subclass
>them, and build your own process from the IPBRoot rootObject() call.
>You'd be in complete control and can do anything you'd like.

I generally agree with the comments you've made here, except for this
paragraph.  Don't subclass Portal (ever, preferably ;).  Just make an
entirely new class which implements IPBRoot.  If appropriate (as it
likely will be), let that class wrap a Portal instance.  eg,

    portal = Portal(...)
    ...
    factory = PBServerFactory(YourRoot(portal))

Jean-Paul




More information about the Twisted-Python mailing list