Authorize Tag Helper for ASP.NET Core
In ASP.NET Core, it's easy to control access to Controllers and Action Methods using the Authorize attribute. This attribute provides a simple way to ensure only authorized users are able to access certain parts of your application. While the Authorize attribute makes it easy to control authorization for an entire page, the mechanism for controlling access to a section of a page is a little clumsy. In this blog post, we build a Tag Helper that makes it incredibly easy to control access to any block HTML in a Razor view.