public async Task TestAdalV5CacheCompatibilityAsync( CacheProgramType interactiveType, CacheProgramType silentType, CacheStorageType cacheStorageType) { var executor = new CacheTestExecutor(s_labUsers, cacheStorageType); await executor.ExecuteAsync(interactiveType, silentType, CancellationToken.None).ConfigureAwait(false); }
public async Task MsalV2ToAdalV3Async() { // Sign in via msal v2, token written to cache with new cache format (expected msal token cache size 6997 bytes) // run adal v3. This fails as adal v3 does not recognize the new cache format. var executor = new CacheTestExecutor( CacheProgramType.MsalV2, CacheProgramType.AdalV3, expectedMsalCacheSizeBytes: 6997, expectSecondTokenFromCache: true); await executor.ExecuteAsync(CancellationToken.None).ConfigureAwait(false); }
public async Task AdalV4ToMsalV2Async() { // Sign in via adal v4, token is written in cache with old adal v3 cache format (expected size 5156 bytes) // Run msal V2. this should FAIL since MSAL does not understand the ADALV3 token cache format and throws exception var executor = new CacheTestExecutor( CacheProgramType.AdalV4, CacheProgramType.MsalV2, 5156, expectSecondTokenFromCache: true); await executor.ExecuteAsync(CancellationToken.None).ConfigureAwait(false); }
public async Task AdalV4ToAdalV3Async() { // Sign in via adal v4, token is written in cache with old adal v3 cache format (expected size 5156 bytes) // Run adal v3, token comes from cache as adalv3 should understand cache format. var executor = new CacheTestExecutor( CacheProgramType.AdalV4, CacheProgramType.AdalV3, 5156, expectSecondTokenFromCache: true); await executor.ExecuteAsync(CancellationToken.None).ConfigureAwait(false); }
public async Task AdalV3ToV4Async() { // Sign in with adal v3, Token written to old Adal V3 cache format (expected size 5014 bytes) // Run Common Cache Adal V4. token is read from the cache via old adal v3 format. var executor = new CacheTestExecutor( CacheProgramType.AdalV3, CacheProgramType.AdalV4, 4434, expectSecondTokenFromCache: true); await executor.ExecuteAsync(CancellationToken.None).ConfigureAwait(false); }
public async Task TestMsalV2CacheCompatibilityAsync( CacheProgramType interactiveType, CacheProgramType silentType, CacheStorageType cacheStorageType) { var executor = new CacheTestExecutor( interactiveType, silentType, cacheStorageType, expectSecondTokenFromCache: true); await executor.ExecuteAsync(CancellationToken.None).ConfigureAwait(false); }