SignatureAuthenticationOptions.cs 830 B

123456789101112131415161718192021222324252627
  1. // 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证。
  2. //
  3. // 必须在法律法规允许的范围内正确使用,严禁将其用于非法、欺诈、恶意或侵犯他人合法权益的目的。
  4. using Microsoft.AspNetCore.Authentication;
  5. namespace Admin.NET.Core;
  6. /// <summary>
  7. /// Signature 身份验证选项
  8. /// </summary>
  9. public class SignatureAuthenticationOptions : AuthenticationSchemeOptions
  10. {
  11. /// <summary>
  12. /// 请求时间允许的偏差范围
  13. /// </summary>
  14. public TimeSpan AllowedDateDrift { get; set; } = TimeSpan.FromMinutes(5);
  15. /// <summary>
  16. /// Signature 身份验证事件
  17. /// </summary>
  18. public new SignatureAuthenticationEvent Events
  19. {
  20. get => (SignatureAuthenticationEvent)base.Events;
  21. set => base.Events = value;
  22. }
  23. }