Last active
February 20, 2021 06:49
-
-
Save fmshk97/1d2174e10d0ee701d39c28d70dc7e144 to your computer and use it in GitHub Desktop.
Add authentication middleware in application's pipeline
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
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
if (env.IsDevelopment()) | |
{ | |
app.UseDeveloperExceptionPage(); | |
} | |
app.UseRouting(); | |
// Below line adds the authentication middleware in our app's pipeline | |
app.UseAuthentication(); | |
app.UseEndpoints(endpoints => | |
{ | |
endpoints.MapControllers(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment