Interface RevokedTokenRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<RevokedTokenEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<RevokedTokenEntity,,Long> org.springframework.data.repository.ListCrudRepository<RevokedTokenEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<RevokedTokenEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<RevokedTokenEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<RevokedTokenEntity>,org.springframework.data.repository.Repository<RevokedTokenEntity,Long>
public interface RevokedTokenRepository
extends org.springframework.data.jpa.repository.JpaRepository<RevokedTokenEntity,Long>
Data access for revoked token entities with operations for token validation and cleanup.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes all revoked tokens that expired before the specified timestamp.booleanexistsByToken(String token) Checks if a token exists in the revoked tokens table.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
existsByToken
Checks if a token exists in the revoked tokens table.- Parameters:
token- hashed token to check- Returns:
- true if token is revoked, false otherwise
-
deleteByExpiresAtBefore
Deletes all revoked tokens that expired before the specified timestamp. Used by scheduled cleanup tasks to prevent unbounded table growth.- Parameters:
now- cutoff timestamp for deletion
-