ASP.NET Identity vs ASP.NET Identity Core:与 Identity Server 等的区别和用法?

ASP.NET Identity vs ASP.NET Identity Core: Differences and Usage with Identity Server, etc.?

我以前使用 ASP.NET Identity,现在我想在我的 ASP.NET Core + Angular 应用程序中使用 ASP.NET Identity Core。

1. ASP.NET Identity 与 ASP.NET Identity Core 之间有什么区别吗?或者我们可以将 ASP.NET Identity Core 集成到 ASP.NET Core 应用程序中,就像 ASP.NET Identity in ASP.NET MVC 等一样?

2. 还有一点我想知道的是,如果我们使用Identity Server,我们是否还能使用ASP.NET Identity Core ?或者是否没有必要使用它并且 Identity Server 是否足以执行所有的东西,例如像 ASP.NET Identity Core 这样的用户和角色管理可以做什么?

3. 如果仅使用 Angular 端而不在后端(ASP.NET 核心)端执行任何操作呢?将它与 Identity Server、OpenID Connect 等一起使用是可能的还是好主意?还是我们应该坚持 ASP.NET 核心端进行身份验证、授权和角色管理?

  1. Is there any difference between ASP.NET Identity vs ASP.NET Identity Core? Or can we integrate ASP.NET Identity Core to an ASP.NET Core app as the same manner like ASP.NET Identity in ASP.NET MVC, etc?

从 ASP.NET Identity 到 ASP.NET Core Identity 似乎没有重大变化,你可以查看文档:

https://docs.microsoft.com/en-us/aspnet/core/migration/identity?view=aspnetcore-5.0

我们可以将Identity集成到ASP.NET核心项目中,您可以参考下面的文档:

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-5.0&tabs=visual-studio

  1. Another point I am wondering is if we use Identity Server, can we still use ASP.NET Identity Core? Or is it unnecessary to use it and is Identity Server enough for performing all the stuff e.g. user and role management like ASP.NET Identity Core can do?

是的,您可以将 Identity 与 Identity Server.Furthermore 一起使用,Identity Server 可以使用 ASP.NET Core Identity 进行用户管理,允许 Microsoft Identity Platform 提供相同的 OAuth/OpenID Connect 功能,由 ASP.NET 核心身份支持。

  1. What about using only Angular side without any implementation on backen (ASP.NET Core) side? Is it possible or good idea to use it with Identity Server, OpenID Connect, etc.? Or should we stick on ASP.NET Core side for authentication, authorization and role management?

您可以将 Angular 与 Identity Server 和 OpenID Connect.As 结合使用来坚持身份,这取决于您。

IdentityServer 将为您提供 OAuth 2.0 和 OpenID Connect 实施,并将为您处理所有细节(为您提供端点、令牌管理、范围、授权等)。它独立运行,因此您可以将它用于多个客户端(SPA、移动、Web 应用程序),并且它与您的应用程序的其余部分很好地隔离。如果您愿意,可以将它与 ASP.NET Core Identity 一起使用。