Package africa.absa.inception.security
Interface PasswordResetRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<PasswordReset,PasswordResetId>,org.springframework.data.jpa.repository.JpaRepository<PasswordReset,PasswordResetId>,org.springframework.data.repository.PagingAndSortingRepository<PasswordReset,PasswordResetId>,org.springframework.data.repository.query.QueryByExampleExecutor<PasswordReset>,org.springframework.data.repository.Repository<PasswordReset,PasswordResetId>
public interface PasswordResetRepository extends org.springframework.data.jpa.repository.JpaRepository<PasswordReset,PasswordResetId>
The PasswordResetRepository interface declares the repository for the PasswordReset domain type.- Author:
- Marcus Portmann
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexpirePasswordResets(LocalDateTime currentTimestamp, LocalDateTime requestedBefore)List<PasswordReset>findAllByUsernameAndStatus(String username, PasswordResetStatus status)-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush
-
-
-
-
Method Detail
-
expirePasswordResets
@Modifying @Query("update PasswordReset pr set pr.expired = :currentTimestamp, pr.status = 3 where pr.status = 1 and pr.requested < :requestedBefore") void expirePasswordResets(@Param("currentTimestamp") LocalDateTime currentTimestamp, @Param("requestedBefore") LocalDateTime requestedBefore)
-
findAllByUsernameAndStatus
List<PasswordReset> findAllByUsernameAndStatus(String username, PasswordResetStatus status)
-
-