Globally Require Authenticated Users By Default Using Fallback Policies in ASP.NET Core

added by DotNetKicks
1/20/2020 4:26:34 PM

191 Views

tldr; You can use Fallback Policies in ASP.NET Core 3.0+ to require an Authenticated User by default. Conceptually, you can think of this as adding an [Authorize] attribute by default to every single Controller and Razor Page ONLY WHEN no other attribute is specified on a Controller or Razor Page (like [AllowAnonymous] or [Authorize(PolicyName="PolicyName")]).


0 comments