code: def auth(self):
          
          self.send(nsq.auth(self.auth_secret))
          frame, data = self.read_response()
  
          if frame == nsq.FRAME_TYPE_ERROR:
              raise data
  
          try:
              response = json.loads(data.decode('utf-8'))
          except ValueError:
              self.close_stream()
              raise errors.NSQException(
                  'failed to parse AUTH response JSON from nsqd: '
                  '{!r}'.format(data))
  
          self.on_auth.send(self, response=response)
          return response
docs: Send authorization secret to nsqd.