1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 14:53:18 +00:00

clear cipher cache when replacing ios autofill identities (#1112)

* clear cipher cache when replacing ios autofill identities

* changed to be service-centric

* support for multiple cache keys

* async suffix

* added cache keys for android
This commit is contained in:
Matt Portune
2020-10-13 15:39:36 -04:00
committed by GitHub
parent 37e19d9a60
commit 0b7e07ebab
11 changed files with 66 additions and 39 deletions

View File

@@ -11,7 +11,8 @@ namespace Bit.Core.Utilities
public static Dictionary<string, object> RegisteredServices { get; set; } = new Dictionary<string, object>();
public static bool Inited { get; set; }
public static void Init(string customUserAgent = null)
public static void Init(string customUserAgent = null, string clearCipherCacheKey = null,
string[] allClearCipherCacheKeys = null)
{
if (Inited)
{
@@ -40,7 +41,7 @@ namespace Bit.Core.Utilities
var userService = new UserService(storageService, tokenService);
var settingsService = new SettingsService(userService, storageService);
var cipherService = new CipherService(cryptoService, userService, settingsService, apiService,
storageService, i18nService, () => searchService);
storageService, i18nService, () => searchService, clearCipherCacheKey, allClearCipherCacheKeys);
var folderService = new FolderService(cryptoService, userService, apiService, storageService,
i18nService, cipherService);
var collectionService = new CollectionService(cryptoService, userService, storageService, i18nService);