Custom Authentication in ASP.Net-Core

后端 未结 4 1203
暖寄归人
暖寄归人 2020-11-28 19:26

I am working on a web app that needs to integrate with an existing user database. I would still like to use the [Authorize] attributes, but I don\'t want to use

4条回答
  •  抹茶落季
    2020-11-28 19:32

    Creating custom authentication in ASP.NET Core can be done in a variety of ways. If you want to build off existing components (but don't want to use identity), checkout the "Security" category of docs on docs.asp.net. https://docs.asp.net/en/latest/security/index.html

    Some articles you might find helpful:

    Using Cookie Middleware without ASP.NET Identity

    Custom Policy-Based Authorization

    And of course, if that fails or docs aren't clear enough, the source code is at https://github.com/dotnet/aspnetcore/tree/master/src/Security which includes some samples.

提交回复
热议问题