Class CleanExpiredAccountTokensUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.account.CleanExpiredAccountTokensUseCase
Use case that deletes the account tokens (password reset links) that have expired, used or not: once expired they
can never be consumed, so keeping them only grows the table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AccountTokenRepositoryPort that stores the account tokens.private final ClockSource of the current time. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
accountTokenRepository
Port that stores the account tokens. -
clock
Source of the current time.
-
-
Constructor Details
-
CleanExpiredAccountTokensUseCase
public CleanExpiredAccountTokensUseCase()
-
-
Method Details
-
execute
public int execute()Deletes the expired account tokens.- Returns:
- the number of deleted tokens.
-