Add envelope receiver access code request feature
Introduced a feature to allow envelope receivers to request an access code via email on the login page. - Added `OnInitializedAsync` in `LoginReceiverPage.razor` to trigger access code requests using `AuthService`. - Implemented `RequestEnvelopeReceiverAccessCodeAsync` in `AuthService.cs` to handle API calls for access code requests. - Added a new endpoint in `AuthController` to process access code requests, including validation, history recording, and email dispatching. - Registered `IEnvelopeMailService` and `AddDispatcher` in `Program.cs` to support email dispatch and database operations. - Refactored `AuthController` constructor for readability and added necessary `using` directives. - Improved logging and error handling for better traceability and robustness. These changes ensure a seamless and secure process for envelope receivers to request access codes, enhancing the user experience.
This commit is contained in:
@@ -25,6 +25,7 @@ using NLog.Web;
|
||||
using NLog;
|
||||
using DigitalData.Auth.Claims;
|
||||
using EnvelopeGenerator.Server;
|
||||
using DigitalData.EmailProfilerDispatcher;
|
||||
|
||||
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
|
||||
logger.Info("EnvelopeGenerator.Server logging initialized!");
|
||||
@@ -323,6 +324,8 @@ try
|
||||
.AddEnvelopeGeneratorServices(config);
|
||||
#pragma warning restore CS0618
|
||||
|
||||
builder.Services.AddDispatcher<EGDbContext>();
|
||||
|
||||
// User Preferences (theme, dark mode, grid layouts — stored in TBDD_CACHE)
|
||||
// Registration handled by Infrastructure DependencyInjection (AddEnvelopeGeneratorInfrastructureServices)
|
||||
|
||||
@@ -346,6 +349,7 @@ try
|
||||
builder.Services.AddScoped<EnvelopeReceiverService>();
|
||||
builder.Services.AddScoped<SignatureService>();
|
||||
builder.Services.AddScoped<SignatureCacheService>();
|
||||
builder.Services.AddScoped<EnvelopeGenerator.Application.Common.Interfaces.Services.IEnvelopeMailService, EnvelopeGenerator.Application.Services.EnvelopeMailService>();
|
||||
builder.Services.AddSingleton<AppVersionService>();
|
||||
|
||||
// EnvelopeService with HttpClient factory (for SSR scenarios)
|
||||
|
||||
Reference in New Issue
Block a user