單點登入CAS的超時時間的設定
阿新 • • 發佈:2018-11-17
分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow
也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!
http://www.mytju.com/classcode/news_readNews.asp?newsID=526
https://wiki.jasig.org/display/CASUM/HOWTO+Configure+Single+Sign+On+Session+Timeout
在cas/WEB-INF/spring-configuration/ticketExpirationPolicies.xml中
<bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy">
<!-- This argument is the time a ticket can exist before its considered expired. -->
<constructor-arg
index="0"
value="7200000" />
</bean>
這是7200秒。
我用了remember me功能,所以是這樣的:
<bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.RememberMeDelegatingExpirationPolicy">
<property name="sessionExpirationPolicy">
<bean class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy">
<constructor-arg index="0" value="1800000"></constructor-arg>
</bean>
</property>
<property name="rememberMeExpirationPolicy">
<bean class="org.jasig.cas.ticket.support.TimeoutExpirationPolicy">
<constructor-arg index="0" value="2592000000"></constructor-arg>
</bean>
</property>
</bean>
1800000是30分鐘,
2592000000是說,記住我,最長能記住多長時間,這個數字好像是30天吧。