| 272 | // ── Init / Shutdown / IsAuthenticated ────────────────────────────────────── |
| 273 | |
| 274 | bool 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 | |
| 294 | bool CloudProviderBase::Init(const std::string& configPath) { |
| 295 | if (m_initialized) return true; |
nothing calls this directly
no test coverage detected