IdentityModel.AspNetCore.OAuth2Introspection icon indicating copy to clipboard operation
IdentityModel.AspNetCore.OAuth2Introspection copied to clipboard

Use MemoryDistributedCache only for PostConfigureOAuth2IntrospectionOptions IoC

Open aramirezh-dev opened this issue 1 year ago • 3 comments

Question: Is it possible to change the IoC for IDistributedCache to use MemoryDistributedCache only for PostConfigureOAuth2IntrospectionOptions? I have a lot of issues with redis connection

aramirezh-dev avatar Mar 09 '23 20:03 aramirezh-dev

@leastprivilege Hi, I'm looking to add the ability to choose an IDistributedCache implementation, like using in-memory for introspection and redis for the other app. I don't want to store plain user data in redis for security reasons.

I can pass in my cache implementation to the OAuth2IntrospectionHandler by registering it via Func<IServiceProvider, OAuth2IntrospectionHandler> which call contructor directly. Unfortunately, this trick doesn't work for the PostConfigureOAuth2IntrospectionOptions, as it's an internal class.

I can create PR if you help me pick right approach for implementing this.

renagaev avatar Apr 05 '23 14:04 renagaev

@leastprivilege @brockallen up

renagaev avatar Apr 19 '23 10:04 renagaev

I have similar problem. Would you please address this? @leastprivilege @brockallen

kooshan avatar Apr 17 '24 10:04 kooshan