Back Forum Reply New

Extending User class

I am interested in extending the user class and noticed that there are various methods such as isAccountNonExpired and isCredentialsNonExpired which implies to me that somewhere some kind of time value is set. Can someone explain to me how this value is controlled. For example, if I want to expire an account after say 90 days  where shall I set this value?

Thanks for your help.

If you wanted to expire an account a period of time (e.g. 90 days) you would have to write that code yourself.  These methods (I assume) were provided to address common security requirements and as such are checked when authenticating a user.  If you want to indicate a users credentials are expired you set the value when constucting the User in the UserDetailsService e.g. JdbcDaoImpl, InMemoryDaoImpl, etc....
¥
Back Forum Reply New