mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-03-10 20:15:26 -04:00
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com> Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
20 lines
647 B
C#
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);
|
|
}
|