I have implemented the ClaimRequirementFilter, but the OnAuthorization method isn't called. The next line of code is added to the ConfigureServices method of the Startup class:
services.AddMvc(config => config.Filters.Add(typeof(ClaimRequirementFilter)));
I am using the next namespaces:
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;