Skip to content

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

@jmprieur

Description

@jmprieur

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions