diff --git a/src/src/lib/cloud/providers/aws/AwsStorage.cc b/src/src/lib/cloud/providers/aws/AwsStorage.cc index f7cc5cebd909faddf3643e2302f9a86c2b7c5ff6..214f873c23de95c65804ef1a7371bec9970370c0 100644 --- a/src/src/lib/cloud/providers/aws/AwsStorage.cc +++ b/src/src/lib/cloud/providers/aws/AwsStorage.cc @@ -156,16 +156,17 @@ namespace seismicdrive std::pair AwsStorage::getCachedStorageAccessToken(const std::string &resourceRef) { auto credentials = storage_auth_provider->getCachedToken(resourceRef); - if (!credentials.first.empty()) - return credentials; + if (!credentials.token.empty()) + return { credentials.token, credentials.expire }; auth_provider->getGcsAuthToken(sdresource, readonly, storage_auth_provider); - return storage_auth_provider->getCachedToken(resourceRef); + auto t = storage_auth_provider->getCachedToken(resourceRef); + return { t.token, t.expire }; } void AwsStorage::setCachedStorageAccessToken( const std::string &resourceRef, std::pair credentials) { - storage_auth_provider->setCachedToken(resourceRef, credentials); + storage_auth_provider->setCachedToken(resourceRef, {credentials.first, credentials.second}); } bool AwsStorage::objectExists(const std::string &cs_path, const GcsContext * /*pContext*/)