From c020c175cb67d80887efca7b18533249a746b589 Mon Sep 17 00:00:00 2001
From: Adi Suissa-Peleg <adip@google.com>
Date: Tue, 18 Jun 2024 17:43:38 +0000
Subject: [PATCH] oauth2: minor code cleanup

Signed-off-by: Adi Suissa-Peleg <adip@google.com>
---
 source/extensions/filters/http/oauth2/filter.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/source/extensions/filters/http/oauth2/filter.cc b/source/extensions/filters/http/oauth2/filter.cc
index f8841ecf4619..a4db988b3862 100644
--- a/source/extensions/filters/http/oauth2/filter.cc
+++ b/source/extensions/filters/http/oauth2/filter.cc
@@ -669,11 +669,9 @@ void OAuth2Filter::onRefreshAccessTokenFailure() {
 
 void OAuth2Filter::addResponseCookies(Http::ResponseHeaderMap& headers,
                                       const std::string& encoded_token) const {
-  std::string max_age;
-  max_age = expires_in_;
-
   // We use HTTP Only cookies.
-  const std::string cookie_tail_http_only = fmt::format(CookieTailHttpOnlyFormatString, max_age);
+  const std::string cookie_tail_http_only =
+      fmt::format(CookieTailHttpOnlyFormatString, expires_in_);
   const CookieNames& cookie_names = config_->cookieNames();
 
   headers.addReferenceKey(