blob: 6bb2955e1044e6316d5356da0ac82a2ebafeca44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
// SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
namespace Progmasoft.Progmaweb.Api.Accounts;
internal interface IAccountStore
{
ValueTask<CreateAccountResult> CreateAsync(AccountRecord account, CancellationToken cancellationToken);
ValueTask<AccountRecord?> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken);
ValueTask<AccountRecord?> FindByGoogleSubjectAsync(string googleSubject, CancellationToken cancellationToken);
ValueTask<AccountRecord?> FindByIdAsync(Guid id, CancellationToken cancellationToken);
ValueTask StoreSessionAsync(SessionRecord session, CancellationToken cancellationToken);
ValueTask<SessionRecord?> FindSessionAsync(byte[] tokenDigest, CancellationToken cancellationToken);
ValueTask RevokeSessionAsync(byte[] tokenDigest, CancellationToken cancellationToken);
}
|