Josh Diehl
Josh Diehl

Reputation: 3079

setting session timeout in Grails Spring Security Core Plugin

Despite searching the plugin docs and general searching, I can't find an answer to this one. The closest I've gotten is the end of this page, which seems to describe setting a Tomcat timeout. There is an entire section of the plugin docs titled "Configuration Settings Now in Config.groovy", is there no way to configure timeout for the plugin without involving the container's settings?

Upvotes: 11

Views: 8783

Answers (1)

Burt Beckwith
Burt Beckwith

Reputation: 75671

The plugin doesn't have settings for session duration - it just uses whatever is configured for the whole app. You can do this by editing web.xml (run grails install-templates if you haven't yet) and edit src/templates/war/web.xml. Add

<session-config>
   <session-timeout>30</session-timeout>
</session-config>

before the welcome-file-list element and set the session-timeout value to whatever number of minutes you want it to be.

Upvotes: 20

Related Questions