using System.Security.Claims; using Microsoft.IdentityModel.Tokens; namespace adas_core.Authentication.Interfaces; public interface ITokenService { int RefreshTokenValidityInDays { get; } /// /// Retrieves a associated with the specified username and claims. /// Returns when no matching token is found. /// /// The username used to look up the security token. /// The list of claims associated with the token. /// A if a matching token is found; otherwise, . SecurityToken? GetToken(string username, List claims); /// /// Retrieves the current refresh token used to obtain new access tokens for authentication. /// /// The refresh token as a string. string GetRefreshToken(); /// /// Serializes the specified security token into its string representation. /// /// The security token to serialize. /// A string containing the serialized form of the security token. string Serialize(SecurityToken token); }