【问题标题】:STS logging user out after 60 mins, how to extend?STS在60分钟后注销用户,如何延长?
【发布时间】:2014-01-31 20:59:48
【问题描述】:

我已经设置了一个信赖方、SharePoint 网站和一个声明应用程序。我的应用程序正在相互通信,并且 SSO 正在使用 SharePoint。我现在唯一的问题是,大约一个小时后,用户退出应用程序并发送到 STS 登录。我似乎无法确定需要更改哪些内容才能延长用户“会话”。我意识到它可能是一个 cookie 而不是一个会话。有人有任何指示吗?我花了一些时间在网上四处寻找,但无法确定解决此问题的方法。

我已对 IIS 进行了以下所有操作以延长超时时间,但无济于事:

  1. 更改应用程序池空闲超时。
  2. 通过转到 ASP - IIS 管理器下的会话属性来更改 ASP 会话超时值。
  3. 通过转到会话状态 ->Cookie 设置来更改 Cookie 设置超时值

RP 的联合身份验证:

<federatedAuthentication>
    <wsFederation passiveRedirectEnabled="true" issuer="mystsapplication" realm="RelyingPartURL" requireHttps="false" />
    <cookieHandler requireSsl="false" path="/" name="MyCookieHandler" persistentSessionLifetime="0:10:0" />
  </federatedAuthentication>

这也在我的 RP 的 web.config 中:

STS 应用的 web.config:

 authentication mode="Forms">
    <forms loginUrl="Login.aspx" protection="All" timeout="600" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" />
</authentication>

【问题讨论】:

    标签: .net iis wif claims-based-identity


    【解决方案1】:

    默认情况下,WIF 将使用令牌中指示的持续时间或本地配置中指示的持续时间中较短的一个。如果您愿意,您可以决定使用其他超时。这是我整理的一个帮手:

    http://brockallen.com/2013/02/17/overriding-ws-federation-token-lifetime-in-thinktecture-identitymodel/

    http://brockallen.com/2013/02/17/sliding-sessions-in-wif-with-the-session-authentication-module-sam-and-thinktecture-identitymodel/

    【讨论】:

    • 布洛克,感谢您提供的信息。我将尝试并更深入地了解这些。我担心这会对我使用 SharePoint 的 SSO 产生负面影响。对此有什么直觉吗?
    猜你喜欢
    • 2017-06-27
    • 1970-01-01
    • 1970-01-01
    • 2011-08-04
    • 2021-02-06
    • 2018-01-31
    • 2013-04-17
    • 2016-12-22
    • 1970-01-01
    相关资源
    最近更新 更多