Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add EnableCacheSynchronization #1344

Merged
merged 3 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; }
Copy link
Contributor

@henrik-me henrik-me Jul 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnableCacheSynchronization

Name is a bit confusing imo, but given that's what we named it in MSAL. #Closed


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