我正在使用asp core 3.1在服务器中使用带有Rest-API的项目,而asp core 3.1则作为单页应用程序的前端.从每个客户端,用户需要提供其用户名和密码才能访问Web API的受保护部分.我想使用Identity Server的功能来访问ASP.NET Core Identity UserManager,RoleManager和SignInManagers,以确定所提供的用户名和密码是否有效.
I’m working in a project with Rest-API in the server by using asp core 3.1, angular as front for single page application. From each client, the user would need to supply their username and password in order to access protected parts of the web API. I would like to use the features of Identity Server to access the ASP.NET Core Identity UserManager, RoleManager, and SignInManagers to determine if the supplied username and password is valid.
我以前从未做过此事,因此尝试在Internet上进行搜索,但找不到很多信息.我想要使用哪些nuget软件包以及如何配置启动方面的帮助.
I haven't ever been done this before and I tried to search about this on Internet but not much info I could find. I would like some help of which nuget packages to use, and how should I configure startup.
谢谢
推荐答案我并没有特别使用Angular来做到这一点(我使用vue),但是基本上是相同的概念.快速的Google搜索打开了Angular特定的教程,可能值得一看: fullstackmark/post/21/user-authentication-and-identity-with-angular-aspnet-core-and-identityserver .在IS4方面,我建议从Asp.Net Identity IS4模板开始(identityserver4.readthedocs.io/zh-CN/latest/quickstarts/6_aspnet_identity.html )
I haven't done this with Angular in particular (I use vue), but it's basically the same concept. A quick Google search turned up an Angular specific tutorial that might be worth looking through: fullstackmark/post/21/user-authentication-and-identity-with-angular-aspnet-core-and-identityserver. On the IS4 side, I would suggest starting with the Asp.Net Identity IS4 template (identityserver4.readthedocs.io/en/latest/quickstarts/6_aspnet_identity.html)
更多推荐
有没有一种方法可以在ASP.NET Core 3.1 Rest
发布评论