查看身份和访问控制PluralSite视频后,基本上得到我需要的一切设置(我的机器上有一个Thinktecture Identity Server的本地实例,以及身份和访问vs2012扩展),我无法在同一个解决方案中获得两个Web应用程序以针对Identity Server进行身份验证。如何获得两个网站对Thinktecture的Identity Server进行身份验证?
目前,他们都要求我登录到ID服务器,这不是我想要的,我希望能够登录到Id服务器一次,并为两个站点进行身份验证。
以下是我认为这个决定应该怎么去web.config中的部分:
究竟什么是“境界”的作用?这是否需要成为真正的URL,还是可以像名称空间一样处理?我试图在多个站点上使用由Id Server发布的相同安全令牌时,必须发挥映像领域的作用。
<system.identityModel.services>
<federationConfiguration>
<cookieHandler requireSsl="false" />
<wsFederation passiveRedirectEnabled="true" issuer="https://MyIdServer.com/idsvr/issue/wsfed" realm="http://MyLocalServerRunningIISExpress:55495/" reply="http://MyLocalServerRunningIISExpress:55495/" requireHttps="false" />
</federationConfiguration>
</system.identityModel.services>
audienceUris如何工作?我假设如果我想要在多个站点上使用一个安全令牌,我需要让每个站点的URL在audienceUris部分中表示?
<system.identityModel>
<identityConfiguration>
<claimsAuthenticationManager type="SSO.Security.ClaimsAuthenticationManager, SSO.Security" />
<audienceUris>
<add value="http://MyLocalServerRunningIISExpress:55495/" />
<add value="http://MyLocalServerRunningIISExpress:53133/" />
</audienceUris>
</identityConfiguration>
</system.identityModel>
第二个站点的其他web.config文件与上面的部分相似,但端口号在URL上已更改。
同样,我有Id Srv将令牌传回给我,为我认证我的一个网站,但我不能为我的生活得到它的两个工作。
我猜这是一个配置问题,或者可能是我在两个端口号上运行IIS Express的两个实例,而不是真正的IIS服务器调用并使用URL代替的事实?
任何帮助或指针,将不胜感激。
谢谢, 迈克
一个问题是这两个网站的Cookie不同。您需要指定要使用的cookie名称,以便共享相同的cookie。请参阅[我的答案](http://stackoverflow.com/a/17229883/109392)。这解决了单点登录问题,并取消了“记住我”的需求,以使其工作。 – awe 2013-06-21 07:49:35