November 2017
Intermediate to advanced
542 pages
14h 24m
English
The downside of using the persistent-based remember-me feature is that there is no built-in support for cleaning up the expired sessions. In order to do this, we need to implement a background process that cleans up the expired sessions. We have included code in the chapter's sample code to perform the cleanup.
For conciseness, we display a version that does not do validation or error handling in the following code snippet. You can view the full version in the sample code of this chapter:
//src/main/java/com/packtpub/springsecurity/web/authentication/rememberme/ JpaTokenRepositoryCleaner.java public class JpaTokenRepositoryImplCleaner implements Runnable { private final RememberMeTokenRepository ...Read now
Unlock full access