Kavita/Kavita.API/Services/IAuthKeyService.cs
Fesaa c62b20f54b
BE Tech Debt (#4497)
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
2026-03-07 10:04:08 -08:00

20 lines
647 B
C#

using System.Threading;
using System.Threading.Tasks;
namespace Kavita.API.Services;
public interface IAuthKeyService
{
Task UpdateLastAccessedAsync(string authKey, CancellationToken ct = default);
/// <summary>
/// Invalidates the cached authentication data for a specific auth key.
/// Call this when a key is rotated or deleted.
/// </summary>
/// <param name="keyValue">The actual key value (not the ID)</param>
/// <param name="cancellationToken">Cancellation token</param>
Task InvalidateAsync(string keyValue, CancellationToken cancellationToken = default);
string CreateCacheKey(string keyValue);
}