【问题标题】:ThinkTecture IdentityServer Authorize DirectoryThinkTecture IdentityServer 授权目录
【发布时间】: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


    【解决方案1】:

    领域是应用程序的唯一标识符。这可以是任何字符串。我尝试使用类似 urn-ApplicationName 或类似的东西。这样,它就不会与 iisexpress 分配给它的任意事物相关联,并且它实际上具有意义。

    AudienceUri 是可用于表示依赖方的 uri 列表。

    我相信你想要的实际上是 Thinktecture 中的一个设置。信赖方维护页面中有“重定向网址”设置。将其设置为您希望它重定向到的位置。

    【讨论】:

      猜你喜欢
      • 2014-08-01
      • 2014-09-25
      • 2013-08-04
      • 1970-01-01
      • 2015-05-02
      • 1970-01-01
      • 2015-03-18
      • 2017-06-26
      • 2015-10-28
      相关资源
      最近更新 更多