aboutsummaryrefslogtreecommitdiff
path: root/zenserver/upstream/upstreamcache.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2022-01-28 13:03:44 +0100
committerPer Larsson <[email protected]>2022-01-28 13:03:44 +0100
commitc775f3f39bc2a3d8c018c3a925a7cd61231ef3a9 (patch)
tree152399c6b8aa05e51107801431c65a938e0a788f /zenserver/upstream/upstreamcache.cpp
parentExtended auth mgr to restore OpenID provider(s) and token(s). (diff)
downloadzen-c775f3f39bc2a3d8c018c3a925a7cd61231ef3a9.tar.xz
zen-c775f3f39bc2a3d8c018c3a925a7cd61231ef3a9.zip
Get access token from auth mgr.
Diffstat (limited to 'zenserver/upstream/upstreamcache.cpp')
-rw-r--r--zenserver/upstream/upstreamcache.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/zenserver/upstream/upstreamcache.cpp b/zenserver/upstream/upstreamcache.cpp
index 3d6641a4f..68e7edfab 100644
--- a/zenserver/upstream/upstreamcache.cpp
+++ b/zenserver/upstream/upstreamcache.cpp
@@ -18,6 +18,7 @@
#include <zenstore/cas.h>
#include <zenstore/cidstore.h>
+#include <auth/authmgr.h>
#include "cache/structuredcachestore.h"
#include "diag/logging.h"
@@ -84,8 +85,9 @@ namespace detail {
class JupiterUpstreamEndpoint final : public UpstreamEndpoint
{
public:
- JupiterUpstreamEndpoint(const CloudCacheClientOptions& Options)
- : m_Log(zen::logging::Get("upstream"))
+ JupiterUpstreamEndpoint(const CloudCacheClientOptions& Options, AuthMgr& Mgr)
+ : m_AuthMgr(Mgr)
+ , m_Log(zen::logging::Get("upstream"))
, m_UseLegacyDdc(Options.UseLegacyDdc)
{
ZEN_ASSERT(!Options.Name.empty());
@@ -512,6 +514,7 @@ namespace detail {
spdlog::logger& Log() { return m_Log; }
+ AuthMgr& m_AuthMgr;
spdlog::logger& m_Log;
UpstreamEndpointInfo m_Info;
UpstreamStatus m_Status;
@@ -1481,9 +1484,9 @@ MakeUpstreamCache(const UpstreamCacheOptions& Options, ZenCacheStore& CacheStore
}
std::unique_ptr<UpstreamEndpoint>
-MakeJupiterUpstreamEndpoint(const CloudCacheClientOptions& Options)
+MakeJupiterUpstreamEndpoint(const CloudCacheClientOptions& Options, AuthMgr& Mgr)
{
- return std::make_unique<detail::JupiterUpstreamEndpoint>(Options);
+ return std::make_unique<detail::JupiterUpstreamEndpoint>(Options, Mgr);
}
std::unique_ptr<UpstreamEndpoint>