17 lines
533 B
C#
17 lines
533 B
C#
namespace MxGateway.Server.Security.Authentication;
|
|
|
|
public interface IApiKeyAdminStore
|
|
{
|
|
Task CreateAsync(ApiKeyCreateRequest request, CancellationToken cancellationToken);
|
|
|
|
Task<IReadOnlyList<ApiKeyRecord>> ListAsync(CancellationToken cancellationToken);
|
|
|
|
Task<bool> RevokeAsync(string keyId, DateTimeOffset revokedUtc, CancellationToken cancellationToken);
|
|
|
|
Task<bool> RotateAsync(
|
|
string keyId,
|
|
byte[] secretHash,
|
|
DateTimeOffset rotatedUtc,
|
|
CancellationToken cancellationToken);
|
|
}
|