有没有一种方法可以在ASP.NET Core 3.1 Rest

编程入门 行业动态 更新时间:2024-10-12 01:28:52
本文介绍了有没有一种方法可以在ASP.NET Core 3.1 Rest-API中使用Identity Server功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用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

本文发布于:2023-11-17 09:01:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609550.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   ASP   NET   Rest   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!