[Twisted-Python] mind, twisted.cred and HTTPAuthSessionWrapper

Jean-Paul Calderone exarkun at divmod.com
Thu Feb 19 12:28:59 EST 2009


On Thu, 19 Feb 2009 18:07:02 +0100, Esteve Fernandez <esteve at sindominio.net> wrote:
>Hi all, I'm using HTTPAuthSessionWrapper to wrap a portal, which uses our own
>checker against an internal service to authenticate users and I'm having
>trouble to pass extra information to sub resources.
>
>I've read about the mind object and I think that's where all that information
>should go. However, HTTPAuthSessionWrapper passes None as its mind to
>portal.login, so I either have to override _login() or write a method that
>generates "minds" which can be overriden in subclasses to return something
>else than None. I prefer the latter, though.
>
>Anyway, I could be mistaken and "mind" wouldn't be appropriate in this case,
>so I wanted to ask first here, since the mind argument seems to be rarely
>used.

What kind of "extra information" are you trying to pass?  Generally, all
information belongs with the avatar object.  The mind should be used to
interact with the protocol's notion of the user (as the avatar is used to
interact with the realm's notion of the user).

Jean-Paul




More information about the Twisted-Python mailing list