I have a WebAPI project currently that implements the [Authorize] on all methods globally by adding the following code in my Startup.cs. This is a great
config.Filters.Add(new AuthorizeAttribute());
Can I dynamically remove this attribute from selected methods? Is there a way to do this or would I have to manually apply to the end points?
The only other solution I can think of is to have a flag on that attribute, but then it would be applied twice which would make no sense.
Thanks!