Applying Policy-based Authorization in ASP.NET Core
Photo Credit: unsplash/maurosbicego In this post, we will learn how to implement authorization by applying policy-based authorization in ASP.NET Core. In previous versions of ASP.NET MVC such as version 5.2 it was possible to implement a custom authorize attribute and override AuthorizeCore(HttpContextBase httpContext). But in ASP.NET Core this is no longer possible, the recommended approach by Microsoft ASP.NET Core team is to use the declarative role and a rich policy-based model. Enabling Policy-b…