use of com.microsoft.identity.common.internal.cache.ISharedPreferencesFileManager in project microsoft-authentication-library-common-for-android by AzureAD.
the class EstsTelemetry method createLastRequestTelemetryCache.
private IRequestTelemetryCache createLastRequestTelemetryCache(@NonNull final Context context) {
final String methodName = ":createLastRequestTelemetryCache";
if (context == null) {
Logger.verbose(TAG + methodName, "Context is NULL. Unable to create last request telemetry cache.");
return null;
}
Logger.verbose(TAG + methodName, "Creating Last Request Telemetry Cache");
final ISharedPreferencesFileManager sharedPreferencesFileManager = SharedPreferencesFileManager.getSharedPreferences(context, LAST_REQUEST_TELEMETRY_SHARED_PREFERENCES, -1, null);
return new SharedPreferencesLastRequestTelemetryCache(sharedPreferencesFileManager);
}
use of com.microsoft.identity.common.internal.cache.ISharedPreferencesFileManager in project microsoft-authentication-library-common-for-android by AzureAD.
the class BrokerOAuth2TokenCacheTest method initFociCache.
private void initFociCache(final Context context) {
final ISharedPreferencesFileManager fociCacheFileManager = getFociFileManager(context);
mFociCredentialCache = getAccountCredentialCache(fociCacheFileManager);
mFociCache = getTokenCache(context, mFociCredentialCache, true);
}
use of com.microsoft.identity.common.internal.cache.ISharedPreferencesFileManager in project microsoft-authentication-library-common-for-android by AzureAD.
the class BrokerOAuth2TokenCacheTest method initOtherCaches.
private void initOtherCaches(final Context context) {
testAppUids = new int[] { 1338, 1339, 1340, 1341 };
final List<ISharedPreferencesFileManager> fileManagers = getAppUidFileManagers(context, testAppUids);
mOtherAppCredentialCaches = getAccountCredentialCaches(fileManagers);
mOtherAppTokenCaches = new ArrayList<>();
for (final IAccountCredentialCache cache : mOtherAppCredentialCaches) {
mOtherAppTokenCaches.add(getTokenCache(context, cache, false));
}
}
use of com.microsoft.identity.common.internal.cache.ISharedPreferencesFileManager in project microsoft-authentication-library-common-for-android by AzureAD.
the class BrokerOAuth2TokenCacheTest method initAppUidCache.
private MsalOAuth2TokenCache initAppUidCache(final Context context, final int uid) {
final ISharedPreferencesFileManager appUidCacheFileManager = getAppUidFileManager(context, uid);
mAppUidCredentialCache = getAccountCredentialCache(appUidCacheFileManager);
return getTokenCache(context, mAppUidCredentialCache, false);
}
Aggregations