iotgateway/WalkingTec.Mvvm/WalkingTec.Mvvm.Mvc/Auth/JwtAuth/ITokenService.cs
2021-12-14 14:10:44 +08:00

31 lines
784 B
C#

using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
namespace WalkingTec.Mvvm.Mvc.Auth
{
public interface ITokenService
{
IDataContext DC { get; }
/// <summary>
/// Issue token
/// </summary>
/// <param name="loginUserInfo"></param>
/// <returns></returns>
Task<Token> IssueTokenAsync(LoginUserInfo loginUserInfo);
/// <summary>
/// refresh token
/// </summary>
/// <param name="refreshToken">refreshToken</param>
/// <returns></returns>
Task<Token> RefreshTokenAsync(string refreshToken);
/// <summary>
/// clear expired refresh tokens
/// </summary>
/// <returns></returns>
Task ClearExpiredRefreshTokenAsync();
}
}