有没有办法在 asp.net core 3.1 Rest-API 中使用 Identity Server 功能

2024-05-07

我正在使用 asp.net core 3.1 在服务器中使用 Rest-API 的项目,以 Angular 作为单页应用程序的前端。从每个客户端,用户需要提供其用户名和密码才能访问 Web API 的受保护部分。我想使用 Identity Server 的功能来访问 ASP.NET Core Identity UserManager、RoleManager 和 SignInManagers,以确定提供的用户名和密码是否有效。

我以前从未这样做过,我尝试在互联网上搜索此内容,但找不到太多信息。我想要一些有关使用哪些 nuget 包以及应该如何配置启动的帮助。

Thanks


我还没有特别用 Angular 做过这个(我使用 vue),但它基本上是相同的概念。快速 Google 搜索发现了一个 Angular 特定教程,可能值得一看:https://fullstackmark.com/post/21/user-authentication-and-identity-with-angular-aspnet-core-and-identityserver https://fullstackmark.com/post/21/user-authentication-and-identity-with-angular-aspnet-core-and-identityserver。在 IS4 方面,我建议从 Asp.Net Identity IS4 模板开始(https://identityserver4.readthedocs.io/en/latest/quickstarts/6_aspnet_identity.html https://identityserver4.readthedocs.io/en/latest/quickstarts/6_aspnet_identity.html)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

有没有办法在 asp.net core 3.1 Rest-API 中使用 Identity Server 功能 的相关文章

随机推荐