def _on_auth_response(self, data, **kwargs):
        try:
            data = json.loads(data)
        except ValueError:
            self.close()
            self.trigger(
                event.ERROR,
                conn=self,
                error=protocol.IntegrityError(
                    'failed to parse AUTH response JSON from nsqd - %r' % data
                ),
            )
            return

        self.off(event.RESPONSE, self._on_auth_response)
        self.trigger(event.AUTH_RESPONSE, conn=self, data=data)
        return self.trigger(event.READY, conn=self)
dataset/ETHPy150Open nsqio/pynsq/nsq/async.py/AsyncConn._on_auth_response/original