JPA-based PersistentTokenRepository

As we have seen in the earlier chapters, using a Spring Data project for our database mapping can greatly simplify our work. So, to keep things consistent, we are going to refactor our JDBC-based PersistentTokenRepository interface that uses JdbcTokenRepositoryImpl to one that is JPA-based. We will do so by performing the following steps:

  1. First, let's create a domain object to hold the persistent logins, as shown in the following code snippet:
        //src/main/java/com/packtpub/springsecurity/domain/         import        PersistentRememberMeToken;        import javax.persistence.*;        import;        import java.util.Date;        @Entity @Table(name ...

Get Spring Security - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.