refactor(Receiver): Entfernt TotpExpiration aus allen DTOs und Entitäten.
This commit is contained in:
@@ -173,7 +173,6 @@ public class HomeController : ViewControllerBase
|
||||
{
|
||||
return View("EnvelopeLocked")
|
||||
.WithData("CodeType", "authenticatorCode")
|
||||
.WithData("QRCodeExpiration", er_secret.Receiver?.TotpExpiration)
|
||||
.WithData("TfaRegDeadline", er_secret.Receiver?.TfaRegDeadline);
|
||||
}
|
||||
}
|
||||
@@ -200,7 +199,6 @@ public class HomeController : ViewControllerBase
|
||||
if (rcv.TotpSecretkey is null)
|
||||
{
|
||||
rcv.TotpSecretkey = _authenticator.GenerateTotpSecretKey();
|
||||
rcv.TotpExpiration = DateTime.Now.AddMonths(1);
|
||||
await _rcvService.UpdateAsync(rcv);
|
||||
}
|
||||
return await TFAViewAsync(auth.UserSelectSMS, er_secret, envelopeReceiverId);
|
||||
|
||||
@@ -58,7 +58,6 @@ public class TFARegController : ViewControllerBase
|
||||
|
||||
// Generate QR code as base 64
|
||||
rcv!.TotpSecretkey = _authenticator.GenerateTotpSecretKey();
|
||||
rcv.TotpExpiration = DateTime.Now.AddMonths(1);
|
||||
await _rcvService.UpdateAsync(rcv);
|
||||
var totp_qr_64 = _authenticator.GenerateTotpQrCode(userEmail: rcv.EmailAddress, secretKey: rcv.TotpSecretkey).ToBase64String();
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
bool viaAuthenticator = codeType == "authenticatorCode";
|
||||
bool viaTFA = viaSms || viaAuthenticator;
|
||||
DateTime? smsExpiration = ViewData["SmsExpiration"] is DateTime _smsExpiration ? _smsExpiration : null;
|
||||
DateTime? qrCodeExpiration = ViewData["QRCodeExpiration"] is DateTime _qrCodeExpiration ? _qrCodeExpiration : null;
|
||||
bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled;
|
||||
bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber;
|
||||
var envelopeKey = ViewData["EnvelopeKey"] as string;
|
||||
@@ -46,7 +45,7 @@
|
||||
</section>
|
||||
}
|
||||
<section class="text-center">
|
||||
<p>@_localizer[WebKey.Formats.LockedBody.Format(codeKeyName)].Value.Format(qrCodeExpiration.ToString())</p>
|
||||
<p>@_localizer[WebKey.Formats.LockedBody.Format(codeKeyName)].Value</p>
|
||||
</section>
|
||||
<div class="row m-0 p-0">
|
||||
<div class="access-code-panel justify-content-center align-items-center p-0 m-0">
|
||||
|
||||
Reference in New Issue
Block a user