Closed larry-lau closed 6 years ago
Hi. It looks like this is a question about how to use ASP.NET Core. While we do our best to look through all the issues filed here, to get a faster response we suggest posting your questions to StackOverflow using the asp.net-core-mvc tag.
@larry-lau, you can configure AuthorizationFilter
on global level in Startup
to enforce authentication on all your requests: https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/filters?view=aspnetcore-2.0#authorization-filters
The following StackOverflow question has an answer with a sample code which covers some aspects of it: https://stackoverflow.com/questions/35825021/override-global-authorize-filter-in-asp-net-core-mvc-1-0
I am using AzureAd. How do I force user to authentication? I don't have the HomeController where I used to attach an AuthorizeAttribute.
Any built in support for this before I head down the middleware path?
Thanks