diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/HeiCaptchaExtension.cs b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/HeiCaptchaExtension.cs new file mode 100644 index 00000000..1720cfcb --- /dev/null +++ b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/HeiCaptchaExtension.cs @@ -0,0 +1,26 @@ +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Hei.Captcha +{ + public static class HeiCaptchaExtension + { + /// + /// 启用HeiCaptcha + /// + /// + /// + public static IServiceCollection AddHeiCaptcha(this IServiceCollection services) + { + if (services == null) + { + throw new ArgumentNullException(nameof(services)); + } + + services.AddScoped(); + return services; + } + } +} diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/ImageRgba32Extension.cs b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/ImageRgba32Extension.cs new file mode 100644 index 00000000..59c01537 --- /dev/null +++ b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/ImageRgba32Extension.cs @@ -0,0 +1,32 @@ +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Formats.Gif; +using SixLabors.ImageSharp.Formats.Png; +using SixLabors.ImageSharp.PixelFormats; +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace Hei.Captcha +{ + public static class ImageRgba32Extension + { + public static byte[] ToPngArray(this Image img) where TPixel : unmanaged, IPixel + { + using (var ms = new MemoryStream()) + { + img.Save(ms, PngFormat.Instance); + return ms.ToArray(); + } + } + + public static byte[] ToGifArray(this Image img) where TPixel : unmanaged, IPixel + { + using (var ms = new MemoryStream()) + { + img.Save(ms, new GifEncoder()); + return ms.ToArray(); + } + } + } +} diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/ImageSharpExtension.cs b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/ImageSharpExtension.cs new file mode 100644 index 00000000..8e2845ae --- /dev/null +++ b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/ImageSharpExtension.cs @@ -0,0 +1,216 @@ +//using SixLabors.Fonts; +//using SixLabors.ImageSharp; +//using SixLabors.ImageSharp.PixelFormats; +//using SixLabors.ImageSharp.Processing; +//using System; +//using System.Collections.Generic; + +//namespace Hei.Captcha +//{ +// public static class ImageSharpExtension +// { + +// / +// / 绘制中文字符(可以绘制字母数字,但样式可能需要改) +// / +// / +// / < param name="processingContext"> +// / +// / < param name="containerHeight"> +// / +// / < param name="color"> +// / +// / < returns > +// public static IImageProcessingContext DrawingCnText(this IImageProcessingContext processingContext, int containerWidth, int containerHeight, string text, Rgba32 color, Font font) +// where TPixel : struct, IPixel +// { +// return processingContext.Apply(img => +// { +// if (string.IsNullOrEmpty(text) == false) +// { +// Random random = new Random(); +// var textWidth = (img.Width / text.Length); +// var img2Size = Math.Min(textWidth, img.Height); +// var fontMiniSize = (int)(img2Size * 0.6); +// var fontMaxSize = (int)(img2Size * 0.95); + +// for (int i = 0; i < text.Length; i++) +// { +// using (Image img2 = new Image(img2Size, img2Size)) +// { +// Font scaledFont = new Font(font, random.Next(fontMiniSize, fontMaxSize)); +// var point = new Point(i * textWidth, (containerHeight - img2.Height) / 2); +// var textGraphicsOptions = new TextGraphicsOptions(true) +// { +// HorizontalAlignment = HorizontalAlignment.Left, +// VerticalAlignment = VerticalAlignment.Top +// }; + +// img2.Mutate(ctx => ctx +// .DrawText(textGraphicsOptions, text[i].ToString(), scaledFont, color, new Point(0, 0)) +// .Rotate(random.Next(-45, 45)) +// ); +// img.Mutate(ctx => ctx.DrawImage(img2, point, 1)); +// } +// } +// } +// }); +// } + +// public static IImageProcessingContext DrawingEnText(this IImageProcessingContext processingContext, int containerWidth, int containerHeight, string text, string[] colorHexArr, Font[] fonts) +// where TPixel : struct, IPixel +// { +// return processingContext.Apply(img => +// { +// if (string.IsNullOrEmpty(text) == false) +// { +// Random random = new Random(); +// var textWidth = (img.Width / text.Length); +// var img2Size = Math.Min(textWidth, img.Height); +// var fontMiniSize = (int)(img2Size * 0.9); +// var fontMaxSize = (int)(img2Size * 1.37); +// Array fontStyleArr = Enum.GetValues(typeof(FontStyle)); + +// for (int i = 0; i < text.Length; i++) +// { +// using (Image img2 = new Image(img2Size, img2Size)) +// { +// Font scaledFont = new Font(fonts[random.Next(0, fonts.Length)], random.Next(fontMiniSize, fontMaxSize), (FontStyle)fontStyleArr.GetValue(random.Next(fontStyleArr.Length))); +// var point = new Point(i * textWidth, (containerHeight - img2.Height) / 2); +// var colorHex = colorHexArr[random.Next(0, colorHexArr.Length)]; +// var textGraphicsOptions = new TextGraphicsOptions(true) +// { +// HorizontalAlignment = HorizontalAlignment.Left, +// VerticalAlignment = VerticalAlignment.Top +// }; + +// img2.Mutate(ctx => ctx +// .DrawText(textGraphicsOptions, text[i].ToString(), scaledFont, Rgba32.FromHex(colorHex), new Point(0, 0)) +// .DrawingGrid(containerWidth, containerHeight, Rgba32.FromHex(colorHex), 6, 1) +// .Rotate(random.Next(-45, 45)) +// ); +// img.Mutate(ctx => ctx.DrawImage(img2, point, 1)); +// } +// } +// } +// }); +// } + +// / +// / 画圆圈(泡泡) +// / +// / +// / < param name="processingContext"> +// / +// / < param name="containerHeight"> +// / +// / < param name="miniR"> +// / +// / < param name="color"> +// / +// / < returns > +// public static IImageProcessingContext DrawingCircles(this IImageProcessingContext processingContext, int containerWidth, int containerHeight, int count, int miniR, int maxR, TPixel color, bool canOverlap = false) +// where TPixel : struct, IPixel +// { +// return processingContext.Apply(img => +// { +// EllipsePolygon ep = null; +// Random random = new Random(); +// PointF tempPoint = new PointF(); +// List points = new List(); + +// if (count > 0) +// { +// for (int i = 0; i < count; i++) +// { +// if (canOverlap) +// { +// tempPoint = new PointF(random.Next(0, containerWidth), random.Next(0, containerHeight)); +// } +// else +// { +// tempPoint = getCirclePoginF(containerWidth, containerHeight, (miniR + maxR), ref points); +// } +// ep = new EllipsePolygon(tempPoint, random.Next(miniR, maxR)); + +// img.Mutate(ctx => ctx +// .Draw(color, (float)(random.Next(94, 145) / 100.0), ep.Clip()) +// ); +// } +// } +// }); +// } +// / +// / 画杂线 +// / +// / +// / < param name="processingContext"> +// / +// / < param name="containerHeight"> +// / +// / < param name="count"> +// / +// / < returns > +// public static IImageProcessingContext DrawingGrid(this IImageProcessingContext processingContext, int containerWidth, int containerHeight, TPixel color, int count, float thickness) +// where TPixel : struct, IPixel +// { +// return processingContext.Apply(img => +// { +// var points = new List { new PointF(0, 0) }; +// for (int i = 0; i < count; i++) +// { +// getCirclePoginF(containerWidth, containerHeight, 9, ref points); +// } +// points.Add(new PointF(containerWidth, containerHeight)); +// img.Mutate(ctx => ctx +// .DrawLines(color, thickness, points.ToArray()) +// ); +// }); +// } + +// / +// / 散 随机点 +// / +// / +// / < param name="containerHeight"> +// / +// / < param name="list"> +// / +// private static PointF getCirclePoginF(int containerWidth, int containerHeight, double lapR, ref List list) +// { +// Random random = new Random(); +// PointF newPoint = new PointF(); +// int retryTimes = 10; +// double tempDistance = 0; + +// do +// { +// newPoint.X = random.Next(0, containerWidth); +// newPoint.Y = random.Next(0, containerHeight); +// bool tooClose = false; +// foreach (var p in list) +// { +// tooClose = false; +// tempDistance = Math.Sqrt((Math.Pow((p.X - newPoint.X), 2) + Math.Pow((p.Y - newPoint.Y), 2))); +// if (tempDistance < lapR) +// { +// tooClose = true; +// break; +// } +// } +// if (tooClose == false) +// { +// list.Add(newPoint); +// break; +// } +// } +// while (retryTimes-- > 0); + +// if (retryTimes <= 0) +// { +// list.Add(newPoint); +// } +// return newPoint; +// } +// } +//} diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/SecurityCodeHelper.cs b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/SecurityCodeHelper.cs new file mode 100644 index 00000000..a223ef3a --- /dev/null +++ b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/SecurityCodeHelper.cs @@ -0,0 +1,182 @@ +using SixLabors.Fonts; +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Drawing.Processing; +using SixLabors.ImageSharp.Formats.Gif; +using SixLabors.ImageSharp.Formats.Png; +using SixLabors.ImageSharp.PixelFormats; +using SixLabors.ImageSharp.Processing; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace Hei.Captcha +{ + /// + /// 验证码配置和绘制逻辑 + /// + public class SecurityCodeHelper + { + /// + /// 验证码文本池 + /// + private static readonly string[] _cnTextArr = new string[] { "的", "一", "国", "在", "人", "了", "有", "中", "是", "年", "和", "大", "业", "不", "为", "发", "会", "工", "经", "上", "地", "市", "要", "个", "产", "这", "出", "行", "作", "生", "家", "以", "成", "到", "日", "民", "来", "我", "部", "对", "进", "多", "全", "建", "他", "公", "开", "们", "场", "展", "时", "理", "新", "方", "主", "企", "资", "实", "学", "报", "制", "政", "济", "用", "同", "于", "法", "高", "长", "现", "本", "月", "定", "化", "加", "动", "合", "品", "重", "关", "机", "分", "力", "自", "外", "者", "区", "能", "设", "后", "就", "等", "体", "下", "万", "元", "社", "过", "前", "面", "农", "也", "得", "与", "说", "之", "员", "而", "务", "利", "电", "文", "事", "可", "种", "总", "改", "三", "各", "好", "金", "第", "司", "其", "从", "平", "代", "当", "天", "水", "省", "提", "商", "十", "管", "内", "小", "技", "位", "目", "起", "海", "所", "立", "已", "通", "入", "量", "子", "问", "度", "北", "保", "心", "还", "科", "委", "都", "术", "使", "明", "着", "次", "将", "增", "基", "名", "向", "门", "应", "里", "美", "由", "规", "今", "题", "记", "点", "计", "去", "强", "两", "些", "表", "系", "办", "教 正", "条", "最", "达", "特", "革", "收", "二", "期", "并", "程", "厂", "如", "道", "际 及", "西", "口", "京", "华", "任", "调", "性", "导", "组", "东", "路", "活", "广", "意", "比", "投", "决", "交", "统", "党", "南", "安", "此", "领", "结", "营", "项", "情", "解", "议", "义", "山", "先", "车", "然", "价", "放", "世", "间", "因", "共", "院", "步", "物", "界", "集", "把", "持", "无", "但", "城", "相", "书", "村", "求", "治", "取", "原", "处", "府", "研", "质", "信", "四", "运", "县", "军", "件", "育", "局", "干", "队", "团", "又", "造", "形", "级", "标", "联", "专", "少", "费", "效", "据", "手", "施", "权", "江", "近", "深", "更", "认", "果", "格", "几", "看", "没", "职", "服", "台", "式", "益", "想", "数", "单", "样", "只", "被", "亿", "老", "受", "优", "常", "销", "志", "战", "流", "很", "接", "乡", "头", "给", "至", "难", "观", "指", "创", "证", "织", "论", "别", "五", "协", "变", "风", "批", "见", "究", "支", "那", "查", "张", "精", "每", "林", "转", "划", "准", "做", "需", "传", "争", "税", "构", "具", "百", "或", "才", "积", "势", "举", "必", "型", "易", "视", "快", "李", "参", "回", "引", "镇", "首", "推", "思", "完", "消", "值", "该", "走", "装", "众", "责", "备", "州", "供", "包", "副", "极", "整", "确", "知", "贸", "己", "环", "话", "反", "身", "选", "亚", "么", "带", "采", "王", "策", "真", "女", "谈", "严", "斯", "况", "色", "打", "德", "告", "仅", "它", "气", "料", "神", "率", "识", "劳", "境", "源", "青", "护", "列", "兴", "许", "户", "马", "港", "则", "节", "款", "拉", "直", "案", "股", "光", "较", "河", "花", "根", "布", "线", "土", "克", "再", "群", "医", "清", "速", "律", "她", "族", "历", "非", "感", "占", "续", "师", "何", "影", "功", "负", "验", "望", "财", "类", "货", "约", "艺", "售", "连", "纪", "按", "讯", "史", "示", "象", "养", "获", "石", "食", "抓", "富", "模", "始", "住", "赛", "客", "越", "闻", "央", "席", "坚" }; + + private static readonly string[] _enTextArr = new string[] { "a", "b", "c", "d", "e", "f", "g", "h", "k", "m", "n", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "M", "N", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; + + /// + /// 验证码图片宽高 + /// + private readonly int _imageWidth = 120; + + private readonly int _imageHeight = 50; + + /// + /// 泡泡数量 + /// + private int _circleCount = 14; + + /// + /// 泡泡半径范围 + /// + private readonly int _miniCircleR = 2; + + private readonly int _maxCircleR = 8; + + /// + /// 颜色池,较深的颜色 + /// https://tool.oschina.net/commons?type=3 + /// + private static readonly string[] _colorHexArr = new string[] { "#00E5EE", "#000000", "#2F4F4F", "#000000", "#43CD80", "#191970", "#006400", "#458B00", "#8B7765", "#CD5B45" }; + + ///较浅的颜色 + private static readonly string[] _lightColorHexArr = new string[] { "#FFFACD", "#FDF5E6", "#F0FFFF", "#BBFFFF", "#FAFAD2", "#FFE4E1", "#DCDCDC", "#F0E68C" }; + + private static readonly Random _random = new Random(); + + /// + /// 字体池 + /// + private static Font[] _fontArr; + + public SecurityCodeHelper() + { + initFonts(_imageHeight); + } + + /// + /// 生成随机中文字符串 + /// + /// + /// + public string GetRandomCnText(int length) + { + StringBuilder sb = new StringBuilder(); + if (length > 0) + { + do + { + sb.Append(_cnTextArr[_random.Next(0, _cnTextArr.Length)]); + } + while (--length > 0); + } + return sb.ToString(); + } + + /// + /// 生成随机英文字母/数字组合字符串 + /// + /// + /// + public string GetRandomEnDigitalText(int length) + { + StringBuilder sb = new StringBuilder(); + if (length > 0) + { + do + { + if (_random.Next(0, 2) > 0) + { + sb.Append(_random.Next(2, 10)); + } + else + { + sb.Append(_enTextArr[_random.Next(0, _enTextArr.Length)]); + } + } + while (--length > 0); + } + return sb.ToString(); + } + + /// + /// 英文字母+数字组合验证码 + /// + /// + /// 验证码图片字节数组 + public byte[] GetEnDigitalCodeByte(string text) + { + using (Image img = getEnDigitalCodeImage(text)) + { + return img .ToGifArray(); + } + } + + + + /// + /// 生成一个数组组合验证码素材(Image) + /// + /// + /// + private Image getEnDigitalCodeImage(string text) + { + Image img = new Image(_imageWidth, _imageHeight); + var colorTextHex = _colorHexArr[_random.Next(0, _colorHexArr.Length)]; + var lignthColorHex = _lightColorHexArr[_random.Next(0, _lightColorHexArr.Length)]; + + img.Mutate(ctx => ctx + .Fill(Rgba32.ParseHex(_lightColorHexArr[_random.Next(0, _lightColorHexArr.Length)])) + .Glow(Rgba32.ParseHex(lignthColorHex)) + //.DrawingGrid(_imageWidth, _imageHeight, Rgba32.ParseHex(lignthColorHex), 8, 1) + .DrawText(text, _fontArr[0], Rgba32.ParseHex(_colorHexArr[0]),new PointF(0,0)) + //.DrawingEnText(, text, _colorHexArr, _fontArr) + .GaussianBlur(0.4f) + //.DrawingCircles(_imageWidth, _imageHeight, 15, _miniCircleR, _maxCircleR, Color.White) + ); + return img; + } + + /// + /// 初始化字体池 + /// + /// 一个初始大小 + private void initFonts(int fontSize) + { + if (_fontArr == null) + { + var assembly = Assembly.GetExecutingAssembly(); + var names = assembly.GetManifestResourceNames(); + + if (names?.Length > 0 == true) + { + var fontList = new List(); + var fontCollection = new FontCollection(); + + foreach (var name in names) + { + fontList.Add(new Font(fontCollection.Add(assembly.GetManifestResourceStream(name)), fontSize)); + } + + _fontArr = fontList.ToArray(); + } + else + { + throw new Exception($"绘制验证码字体文件加载失败"); + } + } + } + } +} \ No newline at end of file diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/Candara.ttf b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/Candara.ttf new file mode 100644 index 00000000..dbc73697 Binary files /dev/null and b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/Candara.ttf differ diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/STCAIYUN.ttf b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/STCAIYUN.ttf new file mode 100644 index 00000000..f2c31b3a Binary files /dev/null and b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/STCAIYUN.ttf differ diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/impact.ttf b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/impact.ttf new file mode 100644 index 00000000..52701465 Binary files /dev/null and b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/impact.ttf differ diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/monbaiti.ttf b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/monbaiti.ttf new file mode 100644 index 00000000..64f759ff Binary files /dev/null and b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/HeiCaptcha/fonts/monbaiti.ttf differ diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/Yi.Framework.ImageSharp.csproj b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/Yi.Framework.ImageSharp.csproj index 06e1c41c..dd60c1b7 100644 --- a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/Yi.Framework.ImageSharp.csproj +++ b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/Yi.Framework.ImageSharp.csproj @@ -7,11 +7,16 @@ - + + + + + + diff --git a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/YiFrameworkImageSharpModule.cs b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/YiFrameworkImageSharpModule.cs index d1cc3f35..07a81b61 100644 --- a/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/YiFrameworkImageSharpModule.cs +++ b/Yi.Framework.Net6/src/module/Yi.Framework.ImageSharp/YiFrameworkImageSharpModule.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Builder; +using Hei.Captcha; +using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using StartupModules; using System; @@ -18,6 +19,7 @@ namespace Yi.Framework.ImageSharp public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) { services.AddSingleton(); + services.AddHeiCaptcha(); } } } diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/.config/dotnet-tools.json b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/.config/dotnet-tools.json new file mode 100644 index 00000000..3aca4744 --- /dev/null +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "7.0.4", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/Yi.RBAC.Domain.csproj b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/Yi.RBAC.Domain.csproj index b3bf28f7..96c41ae0 100644 --- a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/Yi.RBAC.Domain.csproj +++ b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/Yi.RBAC.Domain.csproj @@ -11,7 +11,6 @@ - diff --git a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/YiRBACDomainModule.cs b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/YiRBACDomainModule.cs index 48096c6e..8be5183e 100644 --- a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/YiRBACDomainModule.cs +++ b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/YiRBACDomainModule.cs @@ -13,6 +13,7 @@ using Yi.Framework.Ddd; using Yi.Framework.DictionaryManager; using Yi.Framework.EventBus; using Yi.Framework.FileManager; +using Yi.Framework.ImageSharp; using Yi.Framework.OperLogManager; using Yi.Framework.Sms.Aliyun; using Yi.RBAC.Domain.Logs; @@ -28,7 +29,8 @@ namespace Yi.RBAC.Domain typeof(YiFrameworkFileManagerModule), typeof(YiFrameworkDictionaryManagerModule), typeof(YiFrameworkCachingMemoryCacheModule), - typeof(YiFrameworkSmsAliyunModule) + typeof(YiFrameworkSmsAliyunModule), + typeof(YiFrameworkImageSharpModule) )] public class YiRBACDomainModule : IStartupModule { @@ -38,8 +40,6 @@ namespace Yi.RBAC.Domain public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context) { - services.AddHeiCaptcha(); - } } }