开发者

how to configure session time out in spring acegi framework?

开发者 https://www.devze.com 2023-01-24 06:02 出处:网络
We are using acegi security for my spring application. Can you please help how to make user to session time out by 5 mins and go back to login screen?

We are using acegi security for my spring application. Can you please help how to make user to session time out by 5 mins and go back to login screen? I tried to configure session-timeout in web.xml. But it is not working. Thank you for your help and time.


I 开发者_Python百科realized that i need to keep 5 min = 300000 mill secconds on expiring tickets in acegi security configuration xml.

Now i have another questions that how to redirect to application home page on login. Currently it is trying to go to the page where it previously logged out. But i want to make it as home page on what ever condition. Your help is greatly appreciated. Thank you.


to get forwared to a specific url after a timeout (defined in the web.xml), you may use

  <http>
    ...
    <session-management invalid-session-url="/sessionTimeout.htm" />
  </http>

Session Management docu


Changing following expiration policy, we can make session log out within time

<bean
        id="serviceTicketExpirationPolicy"
        class="org.jasig.cas.ticket.support.MultiTimeUseOrTimeoutExpirationPolicy">
          <constructor-arg
            index="0"
            value="1" />
         <constructor-arg
            index="1"
            value="600000" />
    </bean>

Cas expiration policies gives more information.

To redirect to login page use following:

<property name="alwaysUseDefaultTargetUrl" value="true"/> 

in casProcessingFilter bean configuration

0

精彩评论

暂无评论...
验证码 换一张
取 消