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.
parent
e922fa49
Please register or sign in to comment