Basic Authentication in ASP.NET Core

后端 未结 5 798
刺人心
刺人心 2020-12-14 13:45

Question

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

Notes

5条回答
  •  鱼传尺愫
    2020-12-14 14:27

    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

提交回复
热议问题