简体   繁体   English

每隔X分钟进行一次Spring Security身份验证(无终止会话)

[英]Spring Security Authentication Every X Minutes (Without Killing Session)

I am interested in asking users to re-authenticate after 15 mins of inactivity without killing their session (session life is longer). 我有兴趣要求用户在15分钟不活动后重新进行身份验证,而又不终止会话(会话寿命更长)。

Is there a way to specify an authentication timeout within Spring Security that would accomplish this automatically or some cleaver way I can accomplish this without too much effort? 有没有一种方法可以在Spring Security中指定可以自动完成此操作的身份验证超时,或者我可以不用过多的努力就可以使用的某种方式来完成?

Adding a request filter seems to be the best way to achieve this goal. 添加请求过滤器似乎是实现此目标的最佳方法。 In order to prevent the loss of data, I chose to have a blocking popup that displays if the session has been inactive. 为了防止数据丢失,我选择了一个阻止弹出窗口,该弹出窗口显示会话是否处于非活动状态。 This way I can refresh the page and the user is right where they left off instead of needing to store the initial request and having to find it and redirect them. 这样,我可以刷新页面,并且用户可以在他们离开的地方进行浏览,而无需存储初始请求并不必查找并重定向它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring Security-exceptionIfMaximumExceeded = false不终止最旧的会话 - Spring security - exceptionIfMaximumExceeded=false not killing oldest session 用于Spring Security和/或Spring BlazeDS集成的会话管理(和终止)的集中式系统 - Centralized system for session management (and killing) for Spring Security and/or Spring BlazeDS Integration Spring Security 3.x:在没有UserDetailsS​​ervice的情况下创建自定义身份验证提供程序 - Spring Security 3.x: Creating a custom authentication provider without a UserDetailsService 使用Spring Security + Spring Session将身份验证设置为true - Setting authentication true with Spring Security + Spring Session 无需身份验证的Spring安全授权 - Spring security authorization without authentication 如何在不发送其他身份验证请求的情况下保持跨域 (CORS) Spring 的登录 session 安全性 - How to keep a login session from a cross origin (CORS) Spring security without sending another authentication request Spring Security x509成功认证 - Spring Security x509 successful authentication Spring安全认证和Ionic / Angular 1.X - Spring security authentication and Ionic/Angular 1.X 没有Spring安全性的ldap和JWT身份验证 - ldap & JWT authentication without spring security Spring Boot Security - 允许无需身份验证 - Spring Boot Security - allow without authentication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM