gpt4 book ai didi

azure - 通过多个应用程序单点登录 ACS

转载 作者:行者123 更新时间:2023-12-02 03:48:32 25 4
gpt4 key购买 nike

简单的单点登录问题

我有两个 MVC4 应用程序:

  **1**- http://localhost/BikeShop    

ACS Relying Party:

- Name: **BikeShop**
- Return Url: **http://localhost/BikeShop**
- Token Format: **SAML 2.0**


**2**- http://localhost/BikePartsShop

ACS Relying Party:

- Name: **BikePartsShop**
- Return Url: **http://localhost/BikePartsShop**
- Token Format: **SAML 2.0**
<小时/>

我的场景

我访问 BikeShop 并显示 ACS 登录页面,我选择我的身份。

我现在可以在 BikeShop 上做一些事情。

然后我访问 BikePartsShop 并显示 ACS 登录页面,我可以选择我的身份。

<小时/>

我必须有的场景

我访问 BikeShop 并显示 ACS 登录页面,我选择我的身份。

我现在可以在 BikeShop 上做一些事情。

然后我访问 BikePartsShop 并且 ACS 授权相同的身份在 BikeShop 中使用,无需进一步的用户干预。

<小时/>

有人实现过这个场景吗?

最诚挚的问候,谢谢!

最佳答案

您可以使用 ACS 管理服务为同一依赖方配置多个回复地址。请参阅this link有关如何添加 RP 的详细信息。从链接的代码示例中,注册更多地址,如下所示:

RelyingParty relyingParty = new RelyingParty()
{
Name = "BikeShop",
AsymmetricTokenEncryptionRequired = false,
TokenType = "SAML_2_0",
TokenLifetime = 3600
};

svc.AddToRelyingParties(relyingParty);

RelyingPartyAddress realm = new RelyingPartyAddress()
{
Address = "http://localhost/",
EndpointType = "Realm"
};

RelyingPartyAddress replyAddress1 = new RelyingPartyAddress()
{
Address = "http://localhost/BikeShop",
EndpointType = "Reply"
};

RelyingPartyAddress replyAddress2 = new RelyingPartyAddress()
{
Address = "http://localhost/BikePartsShop",
EndpointType = "Reply"
};

svc.AddRelatedObject(relyingParty, "RelyingPartyAddresses", realmAddress);
svc.AddRelatedObject(relyingParty, "RelyingPartyAddresses", replyAddress1);
svc.AddRelatedObject(relyingParty, "RelyingPartyAddresses", replyAddress2);

svc.SaveChanges(SaveChangesOptions.Batch);

关于azure - 通过多个应用程序单点登录 ACS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15385710/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com