I want to have a property in my domain class for a certain user which could be use to configure the logout time. Is this possible with springSecurity?
I've searched for online example but haven't found anything
I want to have a property in my domain class for a certain user which could be use to configure the logout time. Is this possible with springSecurity?
I've searched for online example but haven't found anything
The login credentials are stored in the user's session. You can set the maximum amount of inactive time per user with something like this after the user has logged in:
If you want to set the logout time independent of the user's activity, just schedule a timer or job and call
session.invalidate()
at the appropriate time. Note that this might cut off a user in the middle of a task.If you're using "remember me" authentication, see the Spring Security docs for setting the expiry time.