Mid MVC

Use [Authorize] on your API controllers:?

[Authorize]

[ApiController]

[Route("api/[controller]")]

public class OrdersController : ControllerBase

[HttpGet]

Follow :

public IActionResult GetOrders() => Ok("Secured Orders");

More from ASP.NET Core MVC Tutorial

All questions for this course