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
{
///
/// 是否启用浏览器认证
///
public bool Enable { get; set; } = true;
///
/// 允许的浏览器
///
public List AllowBrowsers { get; set; } = new List();
///
/// 允许移动设备
///
public bool AllowMobile { get; set; } = true;
///
/// 允许爬虫
///
public bool AllowSpider { get; set; }
public BrowserAuthenticationOptions() :
this(true, new List() { "Chrome", "Firfox", "Edge" }, true, true)
{
}
public BrowserAuthenticationOptions(bool enable, List allowedBrowsers, bool allowedMMobile, bool allowedSpider)
{
Enable = enable;
AllowBrowsers = allowedBrowsers;
AllowMobile = allowedMMobile;
AllowSpider = allowedSpider;
}
}
}