// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证。
//
// 必须在法律法规允许的范围内正确使用,严禁将其用于非法、欺诈、恶意或侵犯他人合法权益的目的。
using Microsoft.AspNetCore.Authentication;
using System.Security.Claims;
using System.Security.Cryptography;
using System.Text.Encodings.Web;
namespace Admin.NET.Core;
///
/// Signature 身份验证处理
///
public sealed class SignatureAuthenticationHandler : AuthenticationHandler
{
private readonly SysCacheService _cacheService;
public SignatureAuthenticationHandler(IOptionsMonitor options,
ILoggerFactory logger,
UrlEncoder encoder,
ISystemClock clock,
SysCacheService cacheService)
: base(options, logger, encoder, clock)
{
_cacheService = cacheService;
}
private new SignatureAuthenticationEvent Events
{
get => (SignatureAuthenticationEvent)base.Events;
set => base.Events = value;
}
///
/// 确保创建的 Event 类型是 DigestEvents
///
///
protected override Task