[英]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
,我们必须使用ResourceOwnerPasswordValidator
和ProfileService
。 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.我完成了所有工作,并且我根据
UserName
和Password
(来自 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.