【发布时间】:2014-09-02 06:04:36
【问题描述】:
我正在尝试使用Thinktecture Identity Server v2 作为联合身份管理器。我已经启动并运行了身份服务器,并且身份验证工作正常。我的问题是,我用来测试身份验证的测试站点在localhost:8080/ 的页面加载时重定向到身份服务器,但我想要发生的是身份验证重定向在用户单击链接后发生并且仅保护某些目录例如localhost:8080/app/ 和localhost:8080/ 应该可以被非授权用户访问。我基本上是按照this 教程来设置 IdP。
我的 web.config 当前包含
<appSettings>
<add key="ida:FederationMetadataLocation" value="https://localhost/idsrv/FederationMetadata/2007-06/FederationMetadata.xml" />
<add key="ida:Realm" value="https://localhost:8080/" />
<add key="ida:AudienceUri" value="http://localhost/" />
<appSettings>
...
<system.identityModel.services>
<federationConfiguration>
<cookieHandler requireSsl="true" />
<wsFederation
passiveRedirectEnabled="true"
issuer="https://localhost/idsrv/issue/wsfed"
realm="http://localhost/"
requireHttps="true" />
</federationConfiguration>
</system.identityModel.services>
我尝试使用
更改领域<add key="ida:Realm" value="https://localhost:8080/app/" />
但是当我登陆localhost:8080/而不是我希望它发生在localhost:8080/app/时,重定向仍然发生。
编辑:我想我在这里真正要问的是什么是 Realm,什么是 AudienceUri,以及如何将它们配置为仅保护我的应用程序的某些部分(目录)。
【问题讨论】:
标签: asp.net-identity federated-identity thinktecture-ident-server