CAS Single Sign-On: no response to Ajax page refreshing (302 moved temporarily)

Source: Internet
Author: User

Recently, when CAS was used for the single-point authentication service, it was found that after about 20 minutes, no response was returned when pages were refreshed asynchronously (because easyui framework was used, therefore, page refreshing is based on the Ajax + Div method). At first, I thought it was a problem of CAS server timeout. I checked the various configurations and made reference to many posts on the Internet, today, I have no idea if the session has expired because the single-point logon client has not configured any session validity period, that is to say, the client's session duration is the default Tomcat session duration (some people on the Internet say that the default session Validity Period of Tomcat is 30 minutes, but now we find that there will be no response with Ajax in about 20 minutes, so this default 30 minutes is to be confirmed by the experiment), open the project web. add the following code to the XML file (Java project:

<session-config>      <session-timeout>120</session-timeout></session-config>
120 refers to 2 hours. The default unit is minute. Here, 120 minutes are used to maintain the same identity as the CAS server. The default identity of the CAS server is valid for 2 hours. The Code is as follows:

<!-- TicketGrantingTicketExpirationPolicy: Default as of 3.5 -->    <!-- Provides both idle and hard timeouts, for instance 2 hour sliding window with an 8 hour max lifetime -->    <bean id="grantingTicketExpirationPolicy" class="org.jasig.cas.ticket.support.TicketGrantingTicketExpirationPolicy"          p:maxTimeToLiveInSeconds="${tgt.maxTimeToLiveInSeconds:28800}"          p:timeToKillInSeconds="${tgt.timeToKillInSeconds:7200}"/>
The configuration is located in the WEB-INF/spring-configuration/ticketexpirationpolicies. XML, timetokillinseconds is not active validity period, in seconds.

CAS Single Sign-On: no response to Ajax page refreshing (302 moved temporarily)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.