20 lines
1002 B
C#
20 lines
1002 B
C#
using AuthHex.Models;
|
|
|
|
namespace AuthHex.Interfaces
|
|
{
|
|
public interface IUserManageRepository
|
|
{
|
|
Task<User> AddUserAsync(User user, CancellationToken ct = default);
|
|
Task<Token> AddTokenAsync(Token token, CancellationToken ct = default);
|
|
Task<List<User>> GetUserByIdentifiers(string? email, string? mobileNumber, string? nic, string? username, string? Optional1);
|
|
Task<User?> GetUserByIdentifierAndType(string identifier, Guid? userTypeId);
|
|
Task<User?> GetUserByIdAsync(Guid userId, CancellationToken ct = default);
|
|
Task UpdateUserAsync(User user, CancellationToken ct = default);
|
|
Task<List<UserSession>> GetUserSessionsAsync(Guid userId, CancellationToken ct = default);
|
|
Task<UserSession?> GetActiveSessionByRefreshTokenAsync(string refreshToken, CancellationToken ct = default);
|
|
Task InvalidateUserSessionsAsync(Guid userId, CancellationToken ct = default);
|
|
|
|
//Task <bool> GetExUser (string identifier);
|
|
}
|
|
}
|