| | | 1 | | using ArturRios.Mediator.Command; |
| | | 2 | | |
| | | 3 | | namespace ArturRios.Heimdall.Command.Output; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Result of <see cref="Input.PurgeExpiredTokensCommand" />: how many rows the run removed from |
| | | 7 | | /// each table. Zero everywhere is an ordinary successful run, not a failure — most runs find |
| | | 8 | | /// nothing to do. |
| | | 9 | | /// </summary> |
| | | 10 | | /// <remarks> |
| | | 11 | | /// Deliberately carries no <c>Id</c>: a purge has no single target entity, so the auditing |
| | | 12 | | /// decorator records the entry with a null <c>TargetId</c>, which is the honest answer. The |
| | | 13 | | /// counts are what make the entry useful. |
| | | 14 | | /// </remarks> |
| | | 15 | | public class PurgeExpiredTokensCommandOutput : CommandOutput |
| | | 16 | | { |
| | | 17 | | /// <summary>Password reset tokens removed (UC-12/UC-13).</summary> |
| | 26 | 18 | | public int PasswordResetTokensPurged { get; set; } |
| | | 19 | | |
| | | 20 | | /// <summary>Email verification tokens removed (UC-14/UC-15).</summary> |
| | 24 | 21 | | public int EmailVerificationTokensPurged { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary>Two-factor email codes removed (UC-36/UC-38).</summary> |
| | 24 | 24 | | public int TwoFactorEmailCodesPurged { get; set; } |
| | | 25 | | |
| | | 26 | | /// <summary>Unconfirmed pending registrations removed (UC-47).</summary> |
| | 24 | 27 | | public int PendingRegistrationsPurged { get; set; } |
| | | 28 | | |
| | | 29 | | /// <summary>Revoked or expired application credentials removed (UC-55).</summary> |
| | 24 | 30 | | public int ApplicationCredentialsPurged { get; set; } |
| | | 31 | | |
| | | 32 | | /// <summary>Registration-attempt notice budgets whose window had ended removed (FR-SR-14).</summary> |
| | 24 | 33 | | public int AttemptNoticeBudgetsPurged { get; set; } |
| | | 34 | | |
| | | 35 | | /// <summary>Rows removed across all six tables.</summary> |
| | | 36 | | public int TotalPurged => |
| | 7 | 37 | | PasswordResetTokensPurged + EmailVerificationTokensPurged + TwoFactorEmailCodesPurged + |
| | 7 | 38 | | PendingRegistrationsPurged + ApplicationCredentialsPurged + AttemptNoticeBudgetsPurged; |
| | | 39 | | } |