Created
March 17, 2020 01:57
-
-
Save domingoladron/e5bfb3aaa6935c98dc09bcfd48b83d9f to your computer and use it in GitHub Desktop.
aspnetcore.toggleauth.startup.configure.cs
This file contains hidden or 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
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime applicationLifetime) | |
{ | |
//Your other configuration | |
//Use Identity and Access Control, if enabled | |
if (bool.Parse(Configuration["AUTHENTICATION_ENABLED"] ?? "true")) | |
{ | |
app.UseAuthentication(); | |
} | |
app.UseMvc(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment