using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; namespace AuthStudy.Authentication.Browser { public class BrowserAuthenticationOptions : AuthenticationSchemeOptions { /// <summary> /// 允许的浏览器 /// </summary> public List<string> AllowBrowsers { get; set; } = new List<string>(); /// <summary> /// 允许移动设备 /// </summary> public bool AllowMobile { get; set; } = true; /// <summary> /// 允许爬虫 /// </summary> public bool AllowSpider { get; set; } public BrowserAuthenticationOptions() : this(null, true, true) { } public BrowserAuthenticationOptions(List<string>? allowedBrowsers, bool allowedMMobile, bool allowedSpider) { AllowBrowsers = allowedBrowsers ?? BrowserAuthenticationDefault.AllowBrowsers; AllowMobile = allowedMMobile; AllowSpider = allowedSpider; } } }