MCPcopy Create free account
hub / github.com/Selectively11/CloudRedirect / InitSession

Method InitSession

src/common/cloud_provider_base.cpp:274–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272// ── Init / Shutdown / IsAuthenticated ──────────────────────────────────────
273
274bool CloudProviderBase::InitSession(const std::string& tokenPath) {
275 m_tokenPath = tokenPath;
276
277 m_tokenStore = CreateTokenStore();
278 m_transport = CreateHttpTransport(LogTag());
279
280 if (!m_transport->Init()) {
281 LOG("%s Transport init failed", LogTag());
282 return false;
283 }
284
285 if (LoadTokens()) {
286 LOG("%s Tokens loaded from %s", LogTag(), tokenPath.c_str());
287 } else {
288 LOG("%s No tokens at %s -- authenticate via the CloudRedirect UI",
289 LogTag(), tokenPath.c_str());
290 }
291 return true;
292}
293
294bool CloudProviderBase::Init(const std::string& configPath) {
295 if (m_initialized) return true;

Callers

nothing calls this directly

Calls 3

CreateTokenStoreFunction · 0.50
CreateHttpTransportFunction · 0.50
InitMethod · 0.45

Tested by

no test coverage detected