自建登录验证码

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

+3 -3
View File
@@ -14,7 +14,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Configuration;
using Lazy.Captcha.Core;
using CaptchaKit.AspNetCore;
namespace Jiaowu.Api.Tests;
@@ -165,7 +165,7 @@ public sealed class SsoControllerTests
var services = new ServiceCollection();
services.AddLogging();
services.AddDistributedMemoryCache();
services.AddCaptcha(new ConfigurationBuilder().Build());
services.AddCaptchaKit();
services.AddDbContext<AppDbContext>(options => options.UseSqlite(connection));
services
.AddIdentityCore<ApplicationUser>()
@@ -190,7 +190,7 @@ public sealed class SsoControllerTests
userManager,
new StubAuthSessionService(),
cache,
provider.GetRequiredService<ICaptcha>(),
provider.GetRequiredService<ICaptchaKitService>(),
Options.Create(new SsoOptions
{
Enabled = true,