Basic Authentication in ASP.NET Core

A-Sharabiani picture A-Sharabiani · Feb 9, 2016 · Viewed 38.6k times · Source

Question

How can I implement Basic Authentication with Custom Membership in an ASP.NET Core web application?

Notes

  • In MVC 5 I was using the instructions in this article which requires adding a module in the WebConfig.

  • I am still deploying my new MVC Coreapplication on IIS but this approach seems not working.

  • I also do not want to use the IIS built in support for Basic authentication , since it uses the Windows credentials.

Answer

blowdart picture blowdart · Feb 9, 2016

ASP.NET Security will not include Basic Authentication middleware due to its potential insecurity and performance problems.

If you require Basic Authentication middleware for testing purposes, then please look at https://github.com/blowdart/idunno.Authentication