Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save domingoladron/e5bfb3aaa6935c98dc09bcfd48b83d9f to your computer and use it in GitHub Desktop.
Save domingoladron/e5bfb3aaa6935c98dc09bcfd48b83d9f to your computer and use it in GitHub Desktop.
aspnetcore.toggleauth.startup.configure.cs
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