Interface PasswordResetRepository

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void expirePasswordResets​(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
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findOne
    • 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)