def _authd(self, xs): """ Called when the stream has been initialized. Save the JID that we were assigned by the server, as the resource might differ from the JID we asked for. This is stored on the authenticator by its constituent initializers. """ self.jid = self.factory.authenticator.jid StreamManager._authd(self, xs)
def _authd(self, xs): """ Called when the stream has been initialized. Save the JID that we were assigned by the server, as the resource might differ from the JID we asked for. This is stored on the authenticator by its constituent initializers. """ self.jid = self.factory.authenticator.jid StreamManager._authd(self, xs)
def _authd(self, xs): old_send = xs.send def send(obj): if domish.IElement.providedBy(obj) and not obj.getAttribute("from"): obj["from"] = self.xmlstream.thisEntity.full() old_send(obj) xs.send = send StreamManager._authd(self, xs)
def _authd(self, xs): old_send = xs.send def send(obj): if domish.IElement.providedBy(obj) and \ not obj.getAttribute('from'): obj['from'] = self.xmlstream.thisEntity.full() old_send(obj) xs.send = send StreamManager._authd(self, xs)
def _authd(self, xs): #Set JID self.jid = self.xmlstream.thisEntity #Patch send to always include from. old_send = xs.send def send(obj): if domish.IElement.providedBy(obj) and \ not obj.getAttribute('from'): obj['from'] = self.jid.full() old_send(obj) xs.send = send StreamManager._authd(self, xs) self._state = u'authenticated'
def _authd(self, xs): #Set JID self.jid = self.xmlstream.thisEntity #Patch send to always include from. old_send = xs.send def send(obj): if domish.IElement.providedBy(obj) and \ not obj.getAttribute('from'): obj['from'] = self.jid.full() old_send(obj) xs.send = send StreamManager._authd(self, xs) self._state = u'authenticated'
def _authd(self, xs): """ Called when stream initialization has completed. This replaces the C{send} method of the C{XmlStream} instance that represents the current connection so that outgoing stanzas always have a from attribute set to the JID of the component. """ old_send = xs.send def send(obj): if domish.IElement.providedBy(obj) and \ not obj.getAttribute('from'): obj['from'] = self.xmlstream.thisEntity.full() old_send(obj) xs.send = send StreamManager._authd(self, xs)
def _authd(self, xs): """ Called when stream initialization has completed. This replaces the C{send} method of the C{XmlStream} instance that represents the current connection so that outgoing stanzas always have a from attribute set to the JID of the component. """ old_send = xs.send def send(obj): if domish.IElement.providedBy(obj) and \ not obj.getAttribute('from'): obj['from'] = self.xmlstream.thisEntity.full() old_send(obj) xs.send = send StreamManager._authd(self, xs)
def _authd(self, xs): #Save the JID that we were assigned by the server, as the resource # might differ from the JID we asked for. self.jid = self.factory.authenticator.jid StreamManager._authd(self, xs) self._state = u'authenticated'