简体   繁体   English

如何为身份服务器自定义用户存储提供程序,并使我的 AccountController 与 IdentityServer 一起工作

[英]How to customize the userstore provider for identity server and also make my AccountController work together with IdentityServer

I'am working on a new Asp.net core (.Net 5) application and i need to implement an authentication server using IdentityServer as token provider.我正在开发一个新的Asp.net core (.Net 5)应用程序,我需要使用IdentityServer作为令牌提供程序来实现一个身份验证服务器。 The customer asked us to do not use Asp.net core Identity and we have to use ResourceOwnerPasswordValidator and ProfileService .客户要求我们不要使用Asp.net core Identity ,我们必须使用ResourceOwnerPasswordValidatorProfileService I made everything work and i am getting the access_token based on the UserName and the Password (from the Url/Connect/token) but there is a missing part: the Account controller.我完成了所有工作,并且我根据UserNamePassword (来自 Url/Connect/token)获取了 access_token,但是缺少一个部分:帐户 controller。

So i am asking how to make the Identityserver and my AccountController works together.所以我问如何使Identityserver和我的AccountController一起工作。 When the login action invoked and the authentication succeeded i want to invoke the IdentityServer mechanisme.当调用登录操作并且身份验证成功时,我想调用IdentityServer机制。 So guys if anyone has a hint or anything that would be appreciated,and thanks in advance.因此,如果有人有任何提示或任何需要感谢的东西,请提前致谢。

For a new OpenID Connect project today, you should only consider to use the Authorization Code flow or the Clients credentials flow.对于今天的新 OpenID Connect 项目,您应该只考虑使用授权代码流程或客户凭证流程。 All the other flows has been deprecated due to various security issues (Search for OAuth 2.1)由于各种安全问题,所有其他流程已被弃用(搜索 OAuth 2.1)

I understand why they don't want to use ASP.NET Identity, but a compromise canbe to still use the ASP.NET Identity database scheme and its existing integration with IdentityServer.我理解他们为什么不想使用 ASP.NET Identity,但可以妥协以仍然使用 ASP.NET Identity 数据库方案及其与 IdentityServer 的现有集成。 By using the schema used by ASP.NET Identiy, you can then use one of the many existing user management solutions that exists out there, just like this picture shows:通过使用 ASP.NET Identiy 使用的架构,您可以使用现有的许多现有用户管理解决方案之一,如下图所示:

在此处输入图像描述

Ie, use the ASP.NET Identity database tables and the included support for that in IdentityServer, but use something else to actually manage the content in the database table.即,使用 ASP.NET Identity 数据库表和 IdentityServer 中包含的对它的支持,但使用其他东西来实际管理数据库表中的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 IdentityServer4 设置为外部身份提供者 - How to setup IdentityServer4 to be an external identity provider 在AccountController之外放置UserManager和UserStore? - Disposing UserManager and UserStore outside of AccountController? ASP.Net Core 2.1 中的身份&lt; - 自定义 AccountController - Identity in ASP.Net Core 2.1< - Customize AccountController 如何将依赖项注入自定义Identity UserStore实现中? - How to injection dependencies into custom Identity UserStore implementation? Duende 身份服务器:如何将外部提供者令牌与 Duende 令牌一起返回到 Angular/WPF/MVC 客户端 - Duende Identity Server : How to return external provider tokens also to the Angular/WPF/MVC client along with Duende tokens IdentityServer用作另一个IdentityServer的外部身份提供程序无法正确重定向 - IdentityServer used as external identity provider for another IdentityServer fails to properly redirect 如何让 IdentityServer 将用户身份添加到访问令牌? - How to make IdentityServer to add user identity to the access token? 如何从 Duende 身份服务器 (IdentityServer4) 获取令牌 - How to Get token from Duende Identity Server (IdentityServer4) 如何在 IdentityServer 上自定义令牌验证? - How to customize token validation on IdentityServer? 身份服务器多提供者 - Identity server multiple provider
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM