自建登录验证码

This commit is contained in:
biss committed 2026-09-12 08:17:14 +08:00
1 parent 149eb66890
commit 564ffecfed
9 files changed
+75 -49

No files matched your search

@@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Configuration;
using Lazy.Captcha.Core;
using CaptchaKit.AspNetCore;
namespace Jiaowu.Api.Tests;
@@ -50,7 +50,7 @@ public sealed class AuthControllerTests
var services = new ServiceCollection();
services.AddLogging();
services.AddDistributedMemoryCache();
services.AddCaptcha(new ConfigurationBuilder().Build());
services.AddCaptchaKit();
services.AddDbContext<AppDbContext>(options => options
.UseSqlite(connection)
.ReplaceService<IExecutionStrategyFactory, RetryingExecutionStrategyFactory>());
@@ -113,7 +113,7 @@ public sealed class AuthControllerTests
userManager,
new StubAuthSessionService(),
new TwoFactorLoginTicketService(new Microsoft.AspNetCore.DataProtection.EphemeralDataProtectionProvider()),
scope.ServiceProvider.GetRequiredService<ICaptcha>(),
scope.ServiceProvider.GetRequiredService<ICaptchaKitService>(),
NoOpAppCache.Instance);
var request = new StudentActivationRequest(
student.Name,