简体   繁体   English

在身份服务器4中使用多变

[英]Using mutitenancy with identity server 4

We are trying to use saaskit with Identity Server 4 to make multi-tenant application using Identity Server. 我们正在尝试将SaaskitIdentity Server 4一起使用,以使用Identity Server制作多租户应用程序。

Our requirement is as follows. 我们的要求如下。

We have common login page for all clients. 我们为所有客户提供通用的登录页面。 However, once client user will get logged in, we are showing the client list to which user has access and on click of client name user will be redirected to respective clients dashboard. 但是,一旦客户端用户登录,我们将显示该用户有权访问的客户端列表,并且在单击客户端名称时,用户将被重定向到相应的客户端仪表板。

To achieve this we have used below kind of approach. 为了达到这个目的,我们使用了以下一种方法。

  1. Login, client list page added in Identity Server project. 登录,在Identity Server项目中添加了客户端列表页面。
  2. When user clicks desired client, it will be redirected to client project(Here we have already set the dashboard url to client). 当用户单击所需的客户端时,它将重定向到客户端项目(此处我们已经将仪表板URL设置为客户端)。
  3. In client project based on url(For eg clientname/home/dashboard) we are resolving the client using saaskit. 在基于url的客户端项目中(例如,clientname / home / dashboard),我们正在使用saaskit解析客户端。
  4. So now it is supposed to show the dashboard page, however we have added [Authorize] attribute to the dashboard method because of this it is trying to call account/login method. 因此,现在应该显示仪表板页面,但是我们已经在仪表板方法中添加了[Authorize]属性,因为它正试图调用account / login方法。 But here, the method is not called from server project instead it is searching in client project(which is not available) and resulting into error.Also, trying to append ReturnUrl of dashboard to it. 但是在这里,没有从服务器项目中调用该方法,而是在客户端项目中搜索(该方法不可用)并导致错误,并且尝试将仪表板的ReturnUrl附加到该方法上。

So, can anyone tell what is the issue and is the project structure is correct ? 那么,谁能说出问题所在,项目结构是否正确?

When you click on the Client link in the IdentityServer portal, it should bounce you over to your client, which should then immediately begin the login process by bouncing you back through IdentityServer and finally back to the Client again. 当您单击IdentityServer门户中的“客户端”链接时,它将使您跳回您的客户端,然后该客户端应立即通过IdentityServer弹跳并最终再次回到客户端,从而立即开始登录过程。

IdentityServer --> Client --> IdentityServer --> Client. IdentityServer->客户端-> IdentityServer->客户端。

Remember, just because the User has signed into IdentityServer, doesn't mean they have an cookie for the client application. 请记住,仅因为用户已登录IdentityServer,并不意味着他们具有用于客户端应用程序的cookie。 The sign-in process/redirects still have to be performed. 登录过程/重定向仍然必须执行。

我将用作ID之外的独立应用程序的可用客户端列表,这样就可以从ID进行回叫

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

相关问题 在SQL Server中使用身份 - Using identity in sql server 使用身份服务器 3 和身份服务器 4 创建的令牌保护 API - Securing API using Identity Server 3 with token created by identity server 4 在Azure中使用Identity Server签名证书 - Using an Identity Server signing certificate in Azure 如何使用 Identity Server 4 撤销或使令牌无效? - How to revoke or invalidate token using Identity Server 4? 在Xamarin应用程序中使用Identity Server - Using Identity Server inside an Xamarin app 使用 wsl 和身份服务器 4 时出现 ssl 问题 - Problem with ssl while using wsl and identity server 4 使用 Duende 身份服务器和 RSK SAML 身份提供程序存储 - Using Duende Identity Server and RSK SAML Identity Provider Store 使用数据库而不是内存存储身份服务器 4 - Using database instead of in memory store Identity server 4 联合身份令牌复制字符以关闭标签(cookie)(使用Thinktecture Identity Server) - Federated Identity Token duplicating characters for closing tags (cookies) (using Thinktecture Identity Server) 身份服务器 4 OidcClient 使用另一个应用程序生成的令牌 - Identity server 4 OidcClient using token generated by another application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM