refinement phase 8
This commit is contained in:
@@ -86,10 +86,19 @@ builder.Services.AddApplicationServices()
|
||||
.AddRateLimitingPolicies();
|
||||
|
||||
// Development-only: capture each OTP in-memory so GET /api/v1/dev/last_otp/{phone} can complete a login
|
||||
// without an SMS gateway. Nothing here is wired in any other environment.
|
||||
if (builder.Environment.IsDevelopment())
|
||||
// without an SMS gateway. refinement-phase-8: the capture bridge runs ONLY while the log-only mock SMS sender is
|
||||
// selected — once a real gateway (Seams:Sms:Provider) ships, the OTP is delivered over the wire and never logged
|
||||
// or captured. Nothing here is wired in any other environment.
|
||||
var smsProvider = configuration["Seams:Sms:Provider"];
|
||||
var usingMockSms = string.IsNullOrWhiteSpace(smsProvider) || smsProvider.Equals("mock", StringComparison.OrdinalIgnoreCase);
|
||||
if (builder.Environment.IsDevelopment() && usingMockSms)
|
||||
builder.Services.AddDevelopmentOtpCapture();
|
||||
|
||||
// The IPaymentCaptureSimulator + bookings/convert path is a Development/Testing affordance (b10's real webhook
|
||||
// confirm supersedes it in production). Re-register the succeeding mock over the production fail-closed stand-in.
|
||||
if (builder.Environment.IsDevelopment() || builder.Environment.IsEnvironment("Testing"))
|
||||
builder.Services.AddDevelopmentPaymentCapture();
|
||||
|
||||
builder.Services.RegisterValidatorsAsServices();
|
||||
builder.Services.AddExceptionHandler<ExceptionHandler>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user