Skip to content

Commit

Permalink
add EnableCacheSynchronization (#1344)
Browse files Browse the repository at this point in the history
* add EnableCacheSynchronization

* update .net 5.0.*

* fix
  • Loading branch information
jennyf19 authored Jul 26, 2021
1 parent bb7997b commit cea68be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/template-install-dotnet-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
- task: UseDotNet@2
displayName: 'Use .Net Core SDK 5'
inputs:
version: 5.0.100
version: 5.0.x
- task: UseDotNet@2
displayName: 'Use .Net Core SDK 3.1.404'
inputs:
Expand Down
3 changes: 3 additions & 0 deletions src/Microsoft.Identity.Web/MergedOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public ConfidentialClientApplicationOptions ConfidentialClientApplicationOptions
public bool IsDefaultPlatformLoggingEnabled { get; set; }
public LogLevel LogLevel { get; set; }
public string? RedirectUri { get; set; }
public bool EnableCacheSynchronization { get; set; }

internal static void UpdateMergedOptionsFromMicrosoftIdentityOptions(MicrosoftIdentityOptions microsoftIdentityOptions, MergedOptions mergedOptions)
{
Expand Down Expand Up @@ -287,6 +288,7 @@ internal static void UpdateMergedOptionsFromConfidentialClientApplicationOptions

mergedOptions.IsDefaultPlatformLoggingEnabled = confidentialClientApplicationOptions.IsDefaultPlatformLoggingEnabled;
// mergedOptions.LegacyCacheCompatibilityEnabled = confidentialClientApplicationOptions.LegacyCacheCompatibilityEnabled; // must be set through id web options
mergedOptions.EnableCacheSynchronization = confidentialClientApplicationOptions.EnableCacheSynchronization;
mergedOptions.LogLevel = confidentialClientApplicationOptions.LogLevel;
if (string.IsNullOrEmpty(mergedOptions.RedirectUri) && !string.IsNullOrEmpty(confidentialClientApplicationOptions.RedirectUri))
{
Expand Down Expand Up @@ -339,6 +341,7 @@ internal static void UpdateConfidentialClientApplicationOptionsFromMergedOptions

confidentialClientApplicationOptions.IsDefaultPlatformLoggingEnabled = mergedOptions.IsDefaultPlatformLoggingEnabled;
confidentialClientApplicationOptions.LegacyCacheCompatibilityEnabled = mergedOptions.LegacyCacheCompatibilityEnabled;
confidentialClientApplicationOptions.EnableCacheSynchronization = mergedOptions.EnableCacheSynchronization;
confidentialClientApplicationOptions.LogLevel = mergedOptions.LogLevel;
if (string.IsNullOrEmpty(confidentialClientApplicationOptions.RedirectUri) && !string.IsNullOrEmpty(mergedOptions.RedirectUri))
{
Expand Down
1 change: 1 addition & 0 deletions tests/WebAppCallsMicrosoftGraph/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"ClientSecret": "secret-goes-here",
//"EnablePiiLogging": true,
"CallbackPath": "/signin-oidc"
"EnableCacheSynchronization": "false"
},

"GraphBeta": {
Expand Down

0 comments on commit cea68be

Please sign in to comment.