Class CleanupOttUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.ott.CleanupOttUseCase
Deletes what the one-time-code and SMS features leave behind: expired codes, expired pending phone verifications,
cost ledger rows older than the retention and expired magic-link tokens.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClockSource of the current time.private final ExpiredLinkTokenPurgerPort that removes the expired magic-link tokens.private final OneTimeCodeRepositoryPort that stores the codes.private final PhoneVerificationRepositoryPort that stores the pending phone verifications.private final SmsCostLedgerRepositoryPort that stores the SMS spend.private final SmsPropertiesSMS settings, for the retention of the ledger. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
oneTimeCodeRepository
Port that stores the codes. -
phoneVerificationRepository
Port that stores the pending phone verifications. -
smsCostLedgerRepository
Port that stores the SMS spend. -
expiredLinkTokenPurger
Port that removes the expired magic-link tokens. -
smsProperties
SMS settings, for the retention of the ledger. -
clock
Source of the current time.
-
-
Constructor Details
-
CleanupOttUseCase
public CleanupOttUseCase()
-
-
Method Details
-
execute
Runs the cleanup.- Returns:
- the number of rows removed from each store.
-