using System.Threading.Tasks; using BlueWest.Data.Application; using BlueWest.Data.Auth.Context.Users; using Microsoft.Extensions.Hosting; namespace BlueWest.Data.Auth { /// /// Methods for handling session cache data. /// public interface ISessionCache : IHostedService { /// /// Gets a Session Token by Id. /// /// /// Task GetSessionTokenByIdAsync(string tokenId); /// /// Create a new session token /// /// Task AddSessionToken(SessionToken token); /// /// Check for validity of the session /// /// /// Task IsSessionValidAsync(string sessionTokenId); /// /// Checks if the session is valid /// /// /// bool IsSessionValid(string sessionTokenId); /// /// Save Cache /// /// Task SaveAsync(); /// /// Save Cache /// /// void Save(); } }