Refactor: Aktualisierung von APIs und Anwendungsschichten zur Umsetzung von Änderungen im Bereich
This commit is contained in:
@@ -8,6 +8,9 @@ using Microsoft.Extensions.Options;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class EnvelopeSmsHandler : IEnvelopeSmsHandler
|
||||
{
|
||||
private readonly ISmsSender _sender;
|
||||
@@ -18,6 +21,13 @@ public class EnvelopeSmsHandler : IEnvelopeSmsHandler
|
||||
|
||||
private readonly IAuthenticator _authenticator;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="totpSmsParamsOptions"></param>
|
||||
/// <param name="distributedCache"></param>
|
||||
/// <param name="authenticator"></param>
|
||||
public EnvelopeSmsHandler(ISmsSender sender, IOptions<TotpSmsParams> totpSmsParamsOptions, IDistributedCache distributedCache, IAuthenticator authenticator)
|
||||
{
|
||||
_sender = sender;
|
||||
@@ -49,6 +59,12 @@ public class EnvelopeSmsHandler : IEnvelopeSmsHandler
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="totpCode"></param>
|
||||
/// <param name="secretKey"></param>
|
||||
/// <returns></returns>
|
||||
public bool VerifyTotp(string totpCode, string secretKey) => _authenticator
|
||||
.VerifyTotp(totpCode, secretKey, _totpSmsParams.TotpStep, _totpSmsParams.TotpVerificationWindow);
|
||||
}
|
||||
Reference in New Issue
Block a user