Dr_Cox1911
✅ Put `[Authorize("myPolicy")]` behind feature flag
Thanks! It works! I had to get a custom
IAuthorizationPolicyProvider
alongside your solution to support Authorize
attributes with policies that I don't have defined when the feature is disabled. Works like a charm now14 replies
✅ Put `[Authorize("myPolicy")]` behind feature flag
Unfortunately it doesn't work, as I don't even register any services and middleware if the feature is disabled. I get an exception that the auth metadata is defined but no
app.UseAuthorization()
call is made.14 replies
❔ WebApplicationFactory and Minimal-APIs
I have created a quick repo: https://github.com/MichaelHochriegl/WebAppFactoryHostedService
3 replies