我怎样才能使一个安全令牌处于被动STS设置自动失效? [英] How can I make a security token automatically expire in a passive STS setup?

查看:437
本文介绍了我怎样才能使一个安全令牌处于被动STS设置自动失效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了我工作的一个新的应用被动STS。

I have a passive STS set up for a new application I'm working on.

我注意到,当用户的会话结束后,用户通过身份认证。我本来以为,当会议结束后,用户将不再进行身份验证。因为我目前负责建立验证我的老板讨论了这个和我在一起。他说,这将是很好,如果我们能够让用户的登录类似于会话过期怎么闲置一段时间后过期。

I've noticed that when a user's session expires, the user is still authenticated. I would have thought that when the session expires, the user would no longer be authenticated. My boss discussed this with me as I am currently charged with setting up the authentication. He says that it would be good if we could make the user's log on expire after a certain period of inactivity similar to how the session expires.

我熟悉如何与code几行签署了一个用户。我怎样才能让这个用户若在指定时间后自动注销?

I am familiar with how to sign a user out with a few lines of code. How can I make it so that the user is automatically signed out after a specified period of inactivity?

目前,我的时候,最后的遗愿是编程检查,并比较其当前时间的的Global.asax 文件中的一些code;它然后签署用户是否在一定的时间段已经过期。

Currently, I have some code in the global.asax file that programmatically checks when the last request was and compares it to the current time; it then signs the user out if a certain period of time has expired.

推荐答案

彼得·克朗建议在MSDN线程的答案:

Peter Kron has proposed an answer in your MSDN thread:

处理由WSFederationAuthenticationModule提出的SessionSecurityTokenCreated事件。在你可以从拟议令牌创建一个新的SessionSecurityToken,并设置一辈子请你。

Handle the SessionSecurityTokenCreated event raised by WSFederationAuthenticationModule. In that you can create a new SessionSecurityToken from the proposed token, and set the lifetime as you please.

<一个href=\"http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/6b6d51ea-9c15-4744-800b-dd1379b495c3\" rel=\"nofollow\">http://social.msdn.microsoft.com/Forums/en-US/Geneva/thread/6b6d51ea-9c15-4744-800b-dd1379b495c3

这篇关于我怎样才能使一个安全令牌处于被动STS设置自动失效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆