<div dir="ltr"><div><div><div>> In other words, you don't have to log in on the *root* pb object.  <span class="">Login</span>
 is just<br>> a PB method call.  You can have a second portal wrapping a 
different realm<br>> handing out different avatars and you can log in to that
 portal the second time.<br><br></div>I look in t.s.pb to find out what methods are called during log in. PBServerFactory is adapted to a pb root object by _PortalRoot which returns a _PortalWrapper from rootObject(self, broker).<br>
<br></div>_PortalWrapper has a remote_login method with the following code<br><br>def remote_login(self, username):<br>        """<br>        Start of username/password login.<br>        """<br>
        c = challenge()<br>        return c, _PortalAuthChallenger(self.portal, self.broker, username, c)<br><br></div>I'm confused by this because I expect that attempting to return an instance of _PortalAuthChallenger from the remote_login method should fail (ie. insecureJelly). How does this work?<br>
</div>