15 #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_REFRESHING_CREDENTIALS_WRAPPER_H
16 #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_REFRESHING_CREDENTIALS_WRAPPER_H
18 #include "google/cloud/storage/version.h"
19 #include "google/cloud/status.h"
20 #include "google/cloud/status_or.h"
41 template <
typename RefreshFunctor>
43 std::chrono::system_clock::time_point now,
44 RefreshFunctor refresh_fn)
const {
46 return temporary_token_
.token;
51 temporary_token_ =
*std::move(new_token);
52 return temporary_token_
.token;
68 bool IsExpired(std::chrono::system_clock::time_point now)
const;
76 bool IsValid(std::chrono::system_clock::time_point now)
const;