Skip to content

Commit

Permalink
Fixed UserTokenCacheAfterAccessNotification and UserTokenCacheBeforeA…
Browse files Browse the repository at this point in the history
…ccessNotification swapped implementation
  • Loading branch information
Tiago Brenck committed May 30, 2019
1 parent 7f39714 commit 79f604f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions TaskWebApp/Utils/MSALPerUserSessionTokenCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ private void UserTokenCacheBeforeWriteNotification(TokenCacheNotificationArgs ar
/// <param name="args">Contains parameters used by the MSAL call accessing the cache.</param>
private void UserTokenCacheAfterAccessNotification(TokenCacheNotificationArgs args)
{
this.LoadUserTokenCacheFromSession();
// if the access operation resulted in a cache update
if (args.HasStateChanged)
{
this.PersistUserTokenCache();
}
}

/// <summary>
Expand All @@ -187,11 +191,7 @@ private void UserTokenCacheAfterAccessNotification(TokenCacheNotificationArgs ar
/// <param name="args">Contains parameters used by the MSAL call accessing the cache.</param>
private void UserTokenCacheBeforeAccessNotification(TokenCacheNotificationArgs args)
{
// if the access operation resulted in a cache update
if (args.HasStateChanged)
{
this.PersistUserTokenCache();
}
this.LoadUserTokenCacheFromSession();
}

/// <summary>
Expand Down

0 comments on commit 79f604f

Please sign in to comment.