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


ASP.NET Core 2.0 introduced breaking changes to Authentication and Identity.

On 1.x auth providers were configured via Middleware (as the accepted answer's implementation). On 2.0 it's based on services.

Details on MS doc: https://docs.microsoft.com/en-us/aspnet/core/migration/1x-to-2x/identity-2x

I've written a Basic Authentication implementation for ASP.NET Core 2.0 and publish to NuGet: https://github.com/bruno-garcia/Bazinga.AspNetCore.Authentication.Basic