Implement AccountManager

Authored by dvratil on May 27 2018, 11:03 PM.

Description

Implement AccountManager

Since we have multiple components (especially in PIM) that share the
same API keys but are mutually unaware of each other (e.g. IMAP resource
and SMTP transport), they store their keys separately in KWallet. This
leads to each component stealing each others' tokens as they each need
different scopes.

To solve that we introduce AccountManager into the LibKGAPI. The account
manager handles the store internally and when someone requests account
for an API key-account name combination that already exists in the store,
the AccountManager will take care of adding the extra scopes to the
account and re-authenticating it. This way multiple components can share
the same API keys without stealing each others' tokens.

Details

Committed
dvratilMay 27 2018, 11:06 PM
Parents
R477:e922fa49222b: Drive: first bunch of tests
Branches
Unknown
Tags
Unknown