code: def register(config, pconn):
      
      username = config.username
      password = config.password
      authmethod = config.authmethod
      auto_config = config.auto_config
      if not username and not password and not auto_config and authmethod == 'BASIC':
          logger.debug('Username and password must be defined in configuration file with BASIC authentication method.')
          return False
      return pconn.register()
docs: Do registration using basic auth