May 22, 2018 09:11 PM|leftler|LINK
From the very article you linked to
"To make use of these enrichers we can have them injected wherever we require them and DI is available. Since we’ve registered more than one instance, we ask the DI framework for an IEnumerable<IEnricher> which we can then enumerate over to access
I have no control over Microsoft.AspNetCore.Authentication.AuthenticationService, I can not get it to use a
IEnumerable<IClaimsTransformation> unless I register a replacement
IAuthenticationService that overrides AuthenticateAsync. But that just shifts the exact same problem deeper down in to the framework where it is harder to solve the same duplicate registration problem.
My question on this forum is if there is a reason behind Microsoft.AspNetCore.Authentication.AuthenticationService not using some kind of
ClaimsTransformationProvider exactly like how Schemes and
Handlers is currently implemented. Or is it just the fact that no one considered the use case of two 3rd party assemblies both wanting to register a
IClaimsTransformation at the same time.