fix(cnb): skip local email cache and add safe email/state cache clearing
(cherry picked from commit 0e7f589df58240badc1d2340e9856882aa075b63)
This commit is contained in:
@@ -24,8 +24,8 @@ class AuthenticationInfoCacheManager extends CacheManagerInteraction {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> removeAuthenticationInfo() {
|
||||
return _authenticationInfoCacheClient.deleteItem(AuthenticationInfoCache.keyCacheValue);
|
||||
Future<void> clear() {
|
||||
return _authenticationInfoCacheClient.clearAllData();
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -43,12 +43,9 @@ class OidcConfigurationCacheManager extends CacheManagerInteraction {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> deleteOidcConfiguration() async {
|
||||
log('OidcConfigurationCacheManager::deleteOidcConfiguration()');
|
||||
Future<void> clear() async {
|
||||
await Future.wait([
|
||||
_oidcConfigurationCacheClient.deleteItem(
|
||||
CachingConstants.oidcConfigurationCacheKeyName,
|
||||
),
|
||||
_oidcConfigurationCacheClient.clearAllData(),
|
||||
_sharedPreferences.remove(OIDCConstant.keyAuthorityOidc),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ class TokenOidcCacheManager extends CacheManagerInteraction {
|
||||
|
||||
Future<void> persistOneTokenOidc(TokenOIDC tokenOIDC) async {
|
||||
log('TokenOidcCacheManager::persistOneTokenOidc(): $tokenOIDC');
|
||||
await _tokenOidcCacheClient.clearAllData();
|
||||
await clear();
|
||||
log('TokenOidcCacheManager::persistOneTokenOidc(): key: ${tokenOIDC.tokenId.uuid}');
|
||||
log('TokenOidcCacheManager::persistOneTokenOidc(): key\'s hash: ${tokenOIDC.tokenIdHash}');
|
||||
log('TokenOidcCacheManager::persistOneTokenOidc(): token: ${tokenOIDC.token}');
|
||||
@@ -32,7 +32,7 @@ class TokenOidcCacheManager extends CacheManagerInteraction {
|
||||
log('TokenOidcCacheManager::persistOneTokenOidc(): done');
|
||||
}
|
||||
|
||||
Future<void> deleteTokenOidc() async {
|
||||
Future<void> clear() async {
|
||||
await _tokenOidcCacheClient.clearAllData();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user