Reputation: 846
I downloaded JHipster from git and tried to understand how to configure session timeout but couldn't find any web.xml
or java-based class for that.
Could you please help me figure out how can I configure session
timeout for example to be 20 min?
Upvotes: 6
Views: 8086
Reputation: 141
I know this is an old question but the answer needed to be updated as the config setting being called is deprecated. You'll want to use this instead.
server:
port: 8080
servlet:
session:
timeout: 60s
Upvotes: 0
Reputation: 3688
This is a Spring Boot configuration.
You can configure it in your application-*.yml
file:
server:
port: 8080
address: localhost
sessionTimeout: 20000
Upvotes: 10
Reputation: 11882
in your application-*.yml file:
server:
port: 8080
address: localhost
sessionTimeout: 20000
is OK for 20 minutes but if you want to have more 30 minutes your access Token validity ("tokenValidityInSeconds" attribute) is 30 minutes by default. You can configue this attribute in application.yml file.
Example for 3 hours = 180 minutes = 10800 secondes:
authentication:
oauth:
clientid: testspsyapp
secret: mySecretOAuthSecret
# Token is valid 3 hours
tokenValidityInSeconds: 10800
Do not to forget the changes "sessionTimeout" attribut to your application-*.yml file :)
server:
port: 8080
address: localhost
sessionTimeout: 180000
Upvotes: 3