using TakeoutSaaS.Application.Identity.Models;

namespace TakeoutSaaS.Application.Identity.Abstractions;

/// <summary>
/// 刷新令牌存储。
/// </summary>
public interface IRefreshTokenStore
{
    Task<RefreshTokenDescriptor> IssueAsync(long userId, DateTime expiresAt, CancellationToken cancellationToken = default);
    Task<RefreshTokenDescriptor?> GetAsync(string refreshToken, CancellationToken cancellationToken = default);
    Task RevokeAsync(string refreshToken, CancellationToken cancellationToken = default);
}
