feat(Reg.cshtml): Zeitüberschreitung hinzugefügt.

- TFARegController.Reg aktualisiert, um die Seite _Expired view zu senden, wenn receiver.TfaRegDeadline abläuft.
 - TFARegParams Klasse für TimeLimit Configuration erstellt und mit appsettings konfiguriert.
This commit is contained in:
Developer 02
2025-02-06 17:59:19 +01:00
parent 3e6e2078bb
commit 1720e137f9
8 changed files with 71 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
namespace EnvelopeGenerator.Web.Models;
/// <summary>
/// Represents the parameters for two-factor authentication (2FA) registration.
/// </summary>
public class TFARegParams
{
/// <summary>
/// The maximum allowed time for completing the registration process.
/// </summary>
public TimeSpan TimeLimit { get; init; } = new(0, 30, 0);
/// <summary>
/// The deadline for registration, calculated as the current time plus the <see cref="TimeLimit"/>.
/// </summary>
public DateTime Deadline => DateTime.Now.AddTicks(TimeLimit.Ticks);
}