  AnyVerifierImpl(const JwtRequirementOrList& or_list, const AuthFactory& factory,
                  const Protobuf::Map<std::string, JwtProvider>& providers,
                  const BaseVerifierImpl* parent)
      : BaseGroupVerifierImpl(parent) {

    for (const auto& it : or_list.requirements()) {
      switch (it.requires_type_case()) {
      case JwtRequirement::RequiresTypeCase::kAllowMissingOrFailed:
        is_allow_missing_or_failed_ = true;
        break;
      case JwtRequirement::RequiresTypeCase::kAllowMissing:
        is_allow_missing_ = true;
        break;
      default:
        verifiers_.emplace_back(innerCreate(it, providers, factory, this));
        break;
      }
    }

    // RequiresAny only has one missing or failed requirement.
    if (verifiers_.empty() && (is_allow_missing_or_failed_ || is_allow_missing_)) {
      JwtRequirement requirement;
      if (is_allow_missing_or_failed_) {
        requirement.mutable_allow_missing_or_failed();
      } else {
        requirement.mutable_allow_missing();
      }
      verifiers_.emplace_back(innerCreate(requirement, providers, factory, this));
    }
  }
  AnyVerifierImpl(const JwtRequirementOrList& or_list, const AuthFactory& factory,
                  const Protobuf::Map<std::string, JwtProvider>& providers,
                  const BaseVerifierImpl* parent)
      : BaseGroupVerifierImpl(parent) {

    for (const auto& it : or_list.requirements()) {
      switch (it.requires_type_case()) {
      case JwtRequirement::RequiresTypeCase::kAllowMissingOrFailed:
        is_allow_missing_or_failed_ = true;
        break;
      case JwtRequirement::RequiresTypeCase::kAllowMissing:
        is_allow_missing_ = true;
        break;
      default:
        verifiers_.emplace_back(innerCreate(it, providers, factory, this));
        break;
      }
    }

     
    if (verifiers_.empty() && (is_allow_missing_or_failed_ || is_allow_missing_)) {
      JwtRequirement requirement;
      if (is_allow_missing_or_failed_) {
        requirement.mutable_allow_missing_or_failed();
      } else {
        requirement.mutable_allow_missing();
      }
      verifiers_.emplace_back(innerCreate(requirement, providers, factory, this));
    }
  }