- 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.
17 lines
569 B
C#
17 lines
569 B
C#
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);
|
|
} |