验证码优化

This commit is contained in:
biss committed 2026-09-12 07:57:27 +08:00
1 parent f489a3553c
commit 4a3bb84aa4
17 files changed
+156 -430

No files matched your search

+4 -1
View File
@@ -13,6 +13,8 @@ using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Configuration;
using Lazy.Captcha.Core;
namespace Jiaowu.Api.Tests;
@@ -163,6 +165,7 @@ public sealed class SsoControllerTests
var services = new ServiceCollection();
services.AddLogging();
services.AddDistributedMemoryCache();
services.AddCaptcha(new ConfigurationBuilder().Build());
services.AddDbContext<AppDbContext>(options => options.UseSqlite(connection));
services
.AddIdentityCore<ApplicationUser>()
@@ -187,7 +190,7 @@ public sealed class SsoControllerTests
userManager,
new StubAuthSessionService(),
cache,
new LoginCaptchaService(cache),
provider.GetRequiredService<ICaptcha>(),
Options.Create(new SsoOptions
{
Enabled = true,