SPMS_API/SPMS.Application/Interfaces/ITokenCacheService.cs

12 lines
449 B
C#

namespace SPMS.Application.Interfaces;
public interface ITokenCacheService
{
Task<CachedDeviceInfo?> GetDeviceInfoAsync(long serviceId, string deviceId);
Task SetDeviceInfoAsync(long serviceId, string deviceId, CachedDeviceInfo info);
Task InvalidateAsync(long serviceId, string deviceId);
Task InvalidateByServiceAsync(long serviceId);
}
public record CachedDeviceInfo(string Token, int Platform, bool IsActive, bool PushAgreed);