def associateWithStream(self, xs):
        xmlstream.ConnectAuthenticator.associateWithStream(self, xs)

        xs.initializers = [CheckVersionInitializer(xs)]
        inits = [ (xmlstream.TLSInitiatingInitializer, False),
                  (sasl.SASLInitiatingInitializer, True),
                  (BindInitializer, False),
                  (SessionInitializer, False),
                ]

        for initClass, required in inits:
            init = initClass(xs)
            init.required = required
            xs.initializers.append(init)
Register with the XML stream.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/words/protocols/jabber/client.py/XMPPAuthenticator.associateWithStream