Skip to content

Instantly share code, notes, and snippets.

@manoj-choudhari-git
Last active January 25, 2020 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-choudhari-git/f00fef535e2a085233f2bfd507cb977a to your computer and use it in GitHub Desktop.
Save manoj-choudhari-git/f00fef535e2a085233f2bfd507cb977a to your computer and use it in GitHub Desktop.
Startup.Configure Method to Show How to Configure Use Authentication Middleware
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment