Search⌘ K
AI Features

Solution Review: Adding Public and Admin Views

Understand how to configure an ASP.NET Core MVC app to support Single Sign-On by setting client authentication parameters, enabling public access to certain views, and restricting admin views to users with specific roles. This lesson guides you through applying AllowAnonymous and Authorize attributes for managing access effectively.

We'll cover the following...

Overview

The complete solution is available in the following playground:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*"
}
The complete solution with the authorization requirements appropriately applied

Solving the challenge

First, we need to find out what client configuration settings we need to apply in our MVC app to make it compatible with the IdP server. To do so, we can visit the ...