refactor(Receiver): Entfernt TotpExpiration aus allen DTOs und Entitäten.

This commit is contained in:
Developer 02
2025-02-06 19:41:11 +01:00
parent 9cdb1409c0
commit fa36593b26
8 changed files with 3 additions and 16 deletions

View File

@@ -164,14 +164,11 @@ namespace EnvelopeGenerator.Application.Services
throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver information is missing. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}");
if (dto.Receiver.TotpSecretkey is null)
throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver.TotpSecretKey is null. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}");
if (dto.Receiver.TotpExpiration is null)
throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver.TotpExpiration is null. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}");
var totp_qr_64 = _authenticator.GenerateTotpQrCode(userEmail: dto.Receiver.EmailAddress, secretKey: dto.Receiver.TotpSecretkey).ToBase64String();
return SendAsync(dto, EmailTemplateType.TotpSecret, new()
{
{"[TFA_QR_CODE]", totp_qr_64 },
{"[TFA_EXPIRATION]", dto.Receiver.TotpExpiration }
});
}
}