Skip to content

Commit

Permalink
Cosmetic change
Browse files Browse the repository at this point in the history
Signed-off-by: Gustavo Gabriel Moyano <gustavo.g.moyano@gmail.com>
  • Loading branch information
ggmoy committed Apr 13, 2023
1 parent 18b7007 commit a8d9c15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/extensions/filters/http/oauth2/filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,11 @@ void OAuth2Filter::onGetAccessTokenSuccess(const std::string& access_code,
access_token_ = access_code;
id_token_ = id_token;
refresh_token_ = refresh_token;
expires_in_ = std::to_string(expires_in.count());

const auto new_epoch = time_source_.systemTime() + expires_in;
new_expires_ = std::to_string(
std::chrono::duration_cast<std::chrono::seconds>(new_epoch.time_since_epoch()).count());
expires_in_ = std::to_string(expires_in.count());

finishFlow();
}
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/filters/http/oauth2/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ class OAuth2Filter : public Http::PassThroughDecoderFilter, public FilterCallbac
std::string access_token_; // TODO - see if we can avoid this being a member variable
std::string id_token_;
std::string refresh_token_;
std::string new_expires_;
std::string expires_in_;
std::string new_expires_;
absl::string_view host_;
std::string state_;
Http::RequestHeaderMap* request_headers_{nullptr};
Expand Down

0 comments on commit a8d9c15

Please sign in to comment.