This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// OLD WAY FROM ASP.NET CORE PRIOR TO 3.0!!!!!!!!! | |
public class Startup | |
{ | |
// Other Startup code omitted | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
// OLD WAY FROM ASP.NET CORE PRIOR TO 3.0!!!!!!!!! | |
services.AddMvc(options => | |
{ | |
var policy = new AuthorizationPolicyBuilder() | |
.RequireAuthenticatedUser() | |
.Build(); | |
options.Filters.Add(new AuthorizeFilter(policy)); | |
}); | |
// Other service registrations omitted | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment