DuendeSoftware / IdentityServer

The most flexible and standards-compliant OpenID Connect and OAuth 2.x framework for ASP.NET Core
https://duendesoftware.com/products/identityserver
Other
1.49k stars 344 forks source link

Consider different approach for optional services from DI #1520

Open brockallen opened 9 months ago

brockallen commented 9 months ago

In a few places we use optional injected services and check for null to adjust behavior. This is a valid approach when using the MS DI system, but we've seen a few requests from customers that use other DI systems and those often don't allow injecting optional/null dependencies. Perhaps we can review our approach and improve it.

josephdecock commented 9 months ago

These are the services that we will need to think about when implementing this. They're the services I found that are resolved with null as a default value in constructors.

josephdecock commented 2 months ago

Pushing this to 8.0, because this would likely be a breaking change for custom implementations that derive from the default implementations.