refactor(HomeController): LogInEnvelope aktualisiert, um SMS-Code als TOTP zu verifizieren
This commit is contained in:
@@ -15,5 +15,7 @@ namespace EnvelopeGenerator.Application.Contracts
|
||||
string GenerateTotp(string secretKey, int step = 30);
|
||||
|
||||
bool VerifyTotp(string totpCode, string secretKey, int step = 30, VerificationWindow? window = null);
|
||||
|
||||
bool GetTotpExpirationTime(int step = 30);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Contracts
|
||||
{
|
||||
public interface IEnvelopeReceiverCache
|
||||
{
|
||||
Task<string?> GetSmsCodeAsync(string envelopeReceiverId);
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously stores an SMS verification code in the cache and returns the expiration date of the code.
|
||||
/// </summary>
|
||||
/// <param name="envelopeReceiverId">The unique identifier for the recipient of the envelope to associate with the SMS code.</param>
|
||||
/// <param name="code">The SMS verification code to be stored.</param>
|
||||
/// <returns>A task that represents the asynchronous operation. The task result contains the expiration date and time of the stored SMS code.</returns>
|
||||
Task<DateTime> SetSmsCodeAsync(string envelopeReceiverId, string code);
|
||||
|
||||
Task<DateTime?> GetSmsCodeExpirationAsync(string envelopeReceiverId);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts
|
||||
namespace EnvelopeGenerator.Application.Contracts;
|
||||
|
||||
public interface IMessagingService
|
||||
{
|
||||
public interface IMessagingService
|
||||
{
|
||||
string ServiceProvider { get; }
|
||||
string ServiceProvider { get; }
|
||||
|
||||
Task<SmsResponse> SendSmsAsync(string recipient, string message);
|
||||
Task<SmsResponse> SendSmsAsync(string recipient, string message);
|
||||
|
||||
Task<SmsResponse> SendSmsCodeAsync(string recipient, string envelopeReceiverId);
|
||||
}
|
||||
Task<SmsResponse> SendSmsCodeAsync(string recipient, string secretKey, string messageFormat = "{0}");
|
||||
}
|
||||
Reference in New Issue
Block a user