In Asp.Net MVC 5
I was able to do somehting like this:
public class CustomAuthorizeAttribute : AuthorizeAttribute
{
protected override bool AuthorizeCore(HttpContextBase httpContext)
{
// return true or false
}
}
And then use it as attribute on actions.
Is it possible to do it in Asp.Net Core 2.1
and if it is, how to do it?