@@ -5,11 +5,12 @@ import org.springframework.stereotype.Repository;
|
||||
import ru.soune.nocopy.entity.AuthToken;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface AuthTokenRepository extends JpaRepository<AuthToken, Long> {
|
||||
Optional<AuthToken> findByLastUsedAtAndExpiresAtBefore(LocalDateTime lastUsedAt, LocalDateTime expiresAtBefore);
|
||||
List<AuthToken> findByExpiresAtBefore(LocalDateTime expiresAtBefore);
|
||||
Optional<AuthToken> findByLastUsedAtBefore(LocalDateTime lastUsedAt);
|
||||
Optional<AuthToken> findByToken(String token);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user