using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Hotline.Settings;
using Fw.Utility.UnifyResponse;
using Hotline.Share.Dtos.Identity;
using Hotline.Users;
using Hotline.Share.Dtos.Snapshot;

namespace Hotline.Application.Identity
{
    public interface IIdentityAppService
    {
        /// <summary>
        /// 获取三方令牌
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        /// <exception cref="UserFriendlyException"></exception>
        Task<TokenOutDto> GetThredTokenAsync(ThirdTokenInDto dto);

        /// <summary>
        /// 根据OpenId刷新令牌
        /// </summary>
        /// <param name="openId"></param>
        /// <returns></returns>
        Task<TokenOutDto> RefreshTokenAsync(string openId);

        Task<string> LoginAsync(LoginDto dto, CancellationToken cancellationToken);

        Task<string> OldToNewLoginAsync(HotlineLoginOldToNewDto dto, CancellationToken cancellationToken);

        Task<(bool,bool,User)> IsCheckAdmin(string userName);
    }
}
