IIdentityAppService.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Hotline.Settings;
  7. using Fw.Utility.UnifyResponse;
  8. using Hotline.Share.Dtos.Identity;
  9. using Hotline.Users;
  10. using Hotline.Share.Dtos.Snapshot;
  11. namespace Hotline.Application.Identity
  12. {
  13. public interface IIdentityAppService
  14. {
  15. /// <summary>
  16. /// 获取三方令牌
  17. /// </summary>
  18. /// <param name="dto"></param>
  19. /// <returns></returns>
  20. /// <exception cref="UserFriendlyException"></exception>
  21. Task<TokenOutDto> GetThredTokenAsync(ThirdTokenInDto dto);
  22. /// <summary>
  23. /// 根据OpenId刷新令牌
  24. /// </summary>
  25. /// <param name="openId"></param>
  26. /// <returns></returns>
  27. Task<TokenOutDto> RefreshTokenAsync(string openId);
  28. Task<string> LoginAsync(LoginDto dto, CancellationToken cancellationToken);
  29. Task<string> OldToNewLoginAsync(HotlineLoginOldToNewDto dto, CancellationToken cancellationToken);
  30. Task<(bool,bool,User)> IsCheckAdmin(string userName);
  31. }
  32. }