feat: CalDAV credential persistence in Secret Service

Move CalDAV username/password from in-memory config to Secret Service
(gnome-keyring). CalDAVSyncProvider now loads credentials at sync time
and erases them on disconnect. OAuthSecretStore extended with
store/load/erase_caldav_credential methods using a separate libsecret
schema.
This commit is contained in:
2026-07-23 20:39:16 +01:00
parent 5efcfdafb9
commit 23d95e957c
8 changed files with 230 additions and 12 deletions

View File

@@ -40,6 +40,7 @@ using nocal::sync::HttpTransport;
using nocal::sync::OAuthClientConfig;
using nocal::sync::OAuthSecretStore;
using nocal::sync::OAuthTokens;
using nocal::sync::CalDAVCredential;
using nocal::sync::SyncObserver;
using nocal::sync::SyncProgressEvent;
using nocal::sync::SyncStage;
@@ -223,6 +224,18 @@ public:
++erase_calls;
store_data.erase(account_id);
}
void store_caldav_credential(std::string, const CalDAVCredential&,
std::stop_token = {}) override {
std::terminate();
}
[[nodiscard]] std::optional<CalDAVCredential> load_caldav_credential(
std::string, std::stop_token = {}) override {
std::terminate();
}
void erase_caldav_credential(std::string, std::stop_token = {}) override {
std::terminate();
}
};
// -----------------------------------------------------------------------