0

I want to set timeout for my rest api. I tried different options but it doesn't work.

plugin.springsecurity.rest.token.storage.jwt.expiration=1800
                    OR
grails.plugin.springsecurity.rest.token.storage.memcached.expiration=1800

But both options are not works for me.

What I want is the security token have to expire if more than 30 min if it is idle.

JP G
  • 65
  • 7

1 Answers1

0

In Grails 3 (not sure whether it's the same in Grails 2) you can add the following to your application.yml

server: sessionTimeout: 5400

The number is the Timeout in seconds, so in this example 90 minutes.

Solution comes from here: https://stackoverflow.com/a/30861747/1051514

Community
  • 1
  • 1
  • Thanks alex. I think your answer is for web application but I am asking for grails spring security rest and also I am using grails 2.4.4. – JP G Jul 07 '16 at 09:06
  • In Grails 3 this also works when just using the REST API with spring security. Sorry that I cannot help more with Grails 2.4.4 – alexanderfranke Jul 07 '16 at 10:00
  • Thanks alex. Actually application timeout is working for me but REST API security token timeout is not working. Thanks for your response. – JP G Jul 07 '16 at 10:07