1+ #include " GHttpClient.h"
12#include " MixAll.h"
23#include " StsCredentialsProviderImpl.h"
34#include " absl/memory/memory.h"
45#include " absl/strings/match.h"
6+ #include " fmt/format.h"
57#include " ghc/filesystem.hpp"
68#include " google/protobuf/struct.pb.h"
79#include " google/protobuf/util/json_util.h"
810#include " rocketmq/Logger.h"
911#include " spdlog/spdlog.h"
10- #include " GHttpClient.h"
1112#include < cstdlib>
1213#include < fstream>
1314#include < iostream>
1415#include < string>
15- #include " fmt/format.h"
1616
1717ROCKETMQ_NAMESPACE_BEGIN
1818
@@ -78,6 +78,7 @@ ConfigFileCredentialsProvider::ConfigFileCredentialsProvider() {
7878 if (fields.contains (ACCESS_SECRET_FIELD_NAME)) {
7979 access_secret_ = fields.at (ACCESS_SECRET_FIELD_NAME).string_value ();
8080 }
81+ SPDLOG_DEBUG (" Credentials for access_key={} loaded" , access_key_);
8182 } else {
8283 SPDLOG_WARN (" Failed to parse credential JSON config file. Message: {}" , status.message ().data ());
8384 }
@@ -103,9 +104,7 @@ StsCredentialsProviderImpl::StsCredentialsProviderImpl(std::string ram_role_name
103104 http_client_->start ();
104105}
105106
106- StsCredentialsProviderImpl::~StsCredentialsProviderImpl () {
107- http_client_->shutdown ();
108- }
107+ StsCredentialsProviderImpl::~StsCredentialsProviderImpl () { http_client_->shutdown (); }
109108
110109Credentials StsCredentialsProviderImpl::getCredentials () {
111110 if (std::chrono::system_clock::now () >= expiration_) {
@@ -182,5 +181,4 @@ const char* StsCredentialsProviderImpl::FIELD_SESSION_TOKEN = "SecurityToken";
182181const char * StsCredentialsProviderImpl::FIELD_EXPIRATION = " Expiration" ;
183182const char * StsCredentialsProviderImpl::EXPIRATION_DATE_TIME_FORMAT = " %Y-%m-%d%ET%H:%H:%S%Ez" ;
184183
185-
186184ROCKETMQ_NAMESPACE_END
0 commit comments