code: def _check_auth_handler(self, request: Dict[str, Any]):
          
          a_username = request.get("AUTH").get("USERNAME")
          a_password = request.get("AUTH").get("PASSWORD")
          auth_len = len(self.auth)
          if auth_len == 0:
              if any([a_username, a_password]):
                  if self.debug:
                      access_logger.info("login failed", extra=self._extra)
                  raise LoginError("login error ,unknown username/password")
              else:
                  return True
          else:
              for username, password in self.auth:
                  if all([a_username == username, a_password == password]):
                      response = {
                          "MPRPC": self.VERSION,
                          "CODE": 100,
                          "VERSION": self.method_wrapper.version,
                          "DESC": self.method_wrapper.__doc__,
                          "DEBUG": self.debug,
                          "COMPRESER": self.compreser.__name__ if (
                              self.compreser) else None,
                          "TIMEOUT": self.timeout,
                      }
                      self.writer(response)
                      if self.debug:
                          access_logger.info("login succeed", extra=self._extra)
                      break
              else:
                  if self.debug:
                      access_logger.info("login failed", extra=self._extra)
                  raise LoginError("login error ,unknown username/password")
              return True
docs: 用于验证客户端是否有权限调服务.
  
          如果服务端有验证信息,则会根据验证信息判断是否合法
          + 如果合法,那么返回一条信息用于响应验证请求
          + 如果不合法,那么返回验证错误
  
          如果服务端没有验证信息
          + 如果验证信息都为空,直接返回响应
          + 如果信息不为空,那么返回验证错误
  
          Parameters:
              request (Dict[str, Any]): - python字典形式的请求
  
          Return:
              (bool): - 请求是否被验证通过,通过了返回True
  
          Raise:
              (LoginError): - 当验证不通过时抛出