pnpcore
pnpcore copied to clipboard
OnBehalfOfTokenProvider does not cache token - requires UseSharedCache
Category
- [x] Feature request
Describe the feature
There is no way of adding:
.WithCacheOptions(new CacheOptions()
{
UseSharedCache = true
})
to the ConfidentialClientApplication inside of OnBehalfOfAuthenticationProvider. The way our .NET Core API works is that we end up creating a new OnBehalfOfAuthenticationProvider per request, so without this extension the token swap will not cache and has to be repeated with every request.
Describe the solution you'd like
Basically just providing some way of providing this boolean into the constructor arguments of OnBehalfOfAuthenticationProvider as a very basic solution. I'm open to other suggestions.