feat(CodeGenerator): Die Methoden GenerateTotpSecretKey, GenerateTotpQrCode und GenerateTotpQrCode wurden als Schnittstellenimplementierung hinzugefügt.

This commit is contained in:
Developer 02
2024-12-10 22:05:52 +01:00
parent 1657a99aa6
commit 085f37de16
6 changed files with 65 additions and 14 deletions

View File

@@ -1,7 +0,0 @@
namespace EnvelopeGenerator.Application.Configurations
{
public class CodeGeneratorConfig
{
public string CharPool { get; init; } = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789012345678901234567890123456789";
}
}

View File

@@ -0,0 +1,18 @@
namespace EnvelopeGenerator.Application.Configurations
{
public class CodeGeneratorParams
{
public string CharPool { get; init; } = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789012345678901234567890123456789";
public int DefaultTotpSecretKeyLength { get; init; } = 32;
public string TotpIssuer { get; init; } = "signFlow";
/// <summary>
/// 0 is user email, 1 is secret key and 2 is issuer.
/// </summary>
public string TotpUrlFormat { get; init; } = "otpauth://totp/{0}?secret={1}&issuer={2}";
public int TotpQRPixelsPerModule { get; init; } = 20;
}
}