简单的单点登录问题
我有两个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管理服务为同一依赖方配置多个答复地址。有关如何添加RP的详细信息,请参见this link。从链接的代码示例中,注册更多地址,如下所示:
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);