| | | 1 | | using ArturRios.Mediator.Command; |
| | | 2 | | |
| | | 3 | | namespace ArturRios.Heimdall.Command.Input; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Intent to complete a 2FA-gated login (UC-38) by redeeming the challenge token AF-11g issued at |
| | | 7 | | /// login, together with either an app/email code or a recovery code. Carries no acting-person |
| | | 8 | | /// identity — the caller holds no bearer token yet, only the challenge token, submitted here as |
| | | 9 | | /// a plain request body field rather than an <c>Authorization</c> header (FR-2F-10) — the same |
| | | 10 | | /// "opaque token as a body value" shape <see cref="ResetPasswordCommand" />'s <c>Token</c> uses. |
| | | 11 | | /// The person the challenge names is resolved from <see cref="ChallengeToken" /> itself, inside |
| | | 12 | | /// the handler. |
| | | 13 | | /// </summary> |
| | | 14 | | public class VerifyTwoFactorAuthCommand : BaseCommand |
| | | 15 | | { |
| | | 16 | | /// <summary>The short-lived challenge token AF-11g returned from <c>POST /api/auth/login</c>.</summary> |
| | 600 | 17 | | public string ChallengeToken { get; set; } = string.Empty; |
| | | 18 | | |
| | | 19 | | /// <summary>The caller's current app or email code, when proving a code rather than a recovery code.</summary> |
| | 368 | 20 | | public string? Code { get; set; } |
| | | 21 | | |
| | | 22 | | /// <summary>One of the caller's unused recovery codes, when no code is available.</summary> |
| | 490 | 23 | | public string? RecoveryCode { get; set; } |
| | | 24 | | } |