Shuxia Ning
2024-12-30 34b437cfc921d9c3c6e95f25720b2321f4d4a6a7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using Furion;
using Lazy.Captcha.Core;
using Microsoft.Extensions.DependencyInjection;
 
namespace Yw.WebApi
{
    /// <summary>
    /// 
    /// </summary>
    public static class LazyCaptchaSetup
    {
        /// <summary>
        /// 验证码初始化
        /// </summary>
        /// <param name="services"></param>
        public static void AddLazyCaptcha(this IServiceCollection services)
        {
            services.AddCaptcha(App.Configuration);
            services.AddScoped<ICaptcha, RandomCaptcha>();
        }
 
    }
}