簡體   English   中英

Spring security-IDP 的無限用戶會話超時

[英]Spring security- Infinite user session time out with IDP

我們的應用程序使用 Spring 安全 SAML 來處理用戶身份驗證。 我需要讓用戶會話無限期地保持活動狀態。 有沒有辦法在 Spring SAML 中為用戶會話超時設置無限超時?

IDP有以下配置,所以沒問題。

<session-config>

    <session-timeout>-1</session-timeout>

</session-config>

在 SP 中,maxAuthenticationAge 設置為 36000 以使其保持活動狀態 10 小時。 默認為 7200。 http://docs.spring.io/spring-security-saml/docs/current/api/org/springframework/security/saml/websso/WebSSOProfileConsumerImpl.html

一種解決方案可能是通過定期在后台發出身份驗證請求來保持會話處於活動狀態(對這種方法不太確定),以便它永遠不會注銷。 請問還有什么辦法嗎?

為了使其無限,您可以將其設置為一個很長的值:-

 webSSOProfileConsumer.setMaxAuthenticationAge(Long.MAX_VALUE);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM