平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 rivejä
1.1 KiB

  1. using Microsoft.Extensions.Configuration;
  2. using MoYu.ConfigurableOptions;
  3. namespace SafeCampus.Core.Options;
  4. public class TXSmsOptions : IConfigurableOptionsListener<TXSmsOptions>
  5. {
  6. /// <summary>
  7. /// 腾讯云API密钥 SecretId
  8. /// </summary>
  9. public string SecretId { get; set; }
  10. /// <summary>
  11. /// 腾讯云API密钥 SecretKey
  12. /// </summary>
  13. public string SecretKey { get; set; }
  14. /// <summary>
  15. /// 腾讯云短信 Appid
  16. /// </summary>
  17. public string SmsAppId { get; set; }
  18. /// <summary>
  19. /// 腾讯云短信 签名
  20. /// </summary>
  21. public string SmsSn { get; set; }
  22. /// <summary>
  23. /// 验证码模板id
  24. /// </summary>
  25. public string VerificationCodeId { get; set; }
  26. public void PostConfigure(TXSmsOptions options, IConfiguration configuration)
  27. {
  28. }
  29. public void OnListener(TXSmsOptions options, IConfiguration configuration)
  30. {
  31. SecretId=options.SecretId;
  32. SecretKey=options.SecretKey;
  33. SmsAppId=options.SmsAppId;
  34. SmsSn=options.SmsSn;
  35. VerificationCodeId = options.VerificationCodeId;
  36. }
  37. }