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

[Feature Request] Add method to compute the cache key in MsalAbstractCacheAdapter #2135

Closed
4 tasks done
jmprieur opened this issue Mar 21, 2023 · 1 comment · Fixed by #2156
Closed
4 tasks done

[Feature Request] Add method to compute the cache key in MsalAbstractCacheAdapter #2135

jmprieur opened this issue Mar 21, 2023 · 1 comment · Fixed by #2156
Assignees
Labels
Milestone

Comments

@jmprieur
Copy link
Collaborator

jmprieur commented Mar 21, 2023

Why?
Even if the cache key suggested by MSAL.NET was carefully chosen based on data, some partners want to be able to express the key used to serialize and deserialize the cache (for instance Substrate)

What?

  • In MsalAbstractTokenCacheProvider:
    • add a virtual method GetSuggestedCacheKey taking the TokenCacheNotificationArgs. By default this method will return the SuggestedCacheKey member of the token cache notification arg
    • replace all the arg.SuggestedCacheKey by the result to a call to the new method.
  • add a unit test (override the method in MsalTestTokenCacheProvider?)
  • document what partners will need to extend this class, or the MsalDistributedTokenCacheAdapter class, and override the singleton implementing IMsalTokenCacheProvider (see DistributedTokenCacheAdapterExtension)
@jmprieur jmprieur added enhancement New feature or request feature request 1P labels Mar 21, 2023
@jennyf19 jennyf19 added this to the 2.6.1 milestone Mar 21, 2023
@jennyf19
Copy link
Collaborator

Documentation should be in the xml comments.

@westin-m westin-m linked a pull request Mar 29, 2023 that will close this issue
@jennyf19 jennyf19 modified the milestones: 2.6.2, 2.8.0 Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants