Http::FilterHeadersStatus OAuth2Filter::signOutUser(const Http::RequestHeaderMap& headers) {
  Http::ResponseHeaderMapPtr response_headers{Http::createHeaderMap<Http::ResponseHeaderMapImpl>(
      {{Http::Headers::get().Status, std::to_string(enumToInt(Http::Code::Found))}})};

  const std::string new_path = absl::StrCat(Http::Utility::getScheme(headers), "://", host_, "/");
  response_headers->addReferenceKey(
      Http::Headers::get().SetCookie,
      fmt::format(SignoutCookieValue, config_->cookieNames().oauth_hmac_));
  response_headers->addReferenceKey(
      Http::Headers::get().SetCookie,
      fmt::format(SignoutBearerTokenValue, config_->cookieNames().bearer_token_));
  response_headers->addReferenceKey(Http::Headers::get().SetCookie, SignoutIdTokenValue);
  response_headers->addReferenceKey(Http::Headers::get().SetCookie, SignoutRefreshTokenValue);
  response_headers->setLocation(new_path);
  decoder_callbacks_->encodeHeaders(std::move(response_headers), true, SIGN_OUT);

  return Http::FilterHeadersStatus::StopIteration;
}
Http::FilterHeadersStatus OAuth2Filter::signOutUser(const Http::RequestHeaderMap& headers) {
  Http::ResponseHeaderMapPtr response_headers{Http::createHeaderMap<Http::ResponseHeaderMapImpl>(
      {{Http::Headers::get().Status, std::to_string(enumToInt(Http::Code::Found))}})};

  const std::string new_path = absl::StrCat(Http::Utility::getScheme(headers), "://", host_, "/");
  response_headers->addReferenceKey(
      Http::Headers::get().SetCookie,
      fmt::format(SignoutCookieValue, config_->cookieNames().oauth_hmac_));
  response_headers->addReferenceKey(
      Http::Headers::get().SetCookie,
      fmt::format(SignoutBearerTokenValue, config_->cookieNames().bearer_token_));
  response_headers->addReferenceKey(Http::Headers::get().SetCookie, SignoutIdTokenValue);
  response_headers->addReferenceKey(Http::Headers::get().SetCookie, SignoutRefreshTokenValue);
  response_headers->setLocation(new_path);
  decoder_callbacks_->encodeHeaders(std::move(response_headers), true, SIGN_OUT);

  return Http::FilterHeadersStatus::StopIteration;
}