Files
ERP_Auth_Service/Interfaces/IUserManageRepository.cs
Dhananjaya99 15832d1ae3 Decouple UserType, add Role entity and management
Removed all UserType logic and references, replacing them with a new Role model and management system. Introduced RoleManager service, repository, and API endpoint for role CRUD operations. Updated user flows and JWT claims to use RoleCode. Removed admin-only user CRUD endpoints. Updated DI, documentation, and error handling for consistency. Appsettings and DTOs now reflect the new role-based approach.
2026-10-19 12:57:07 +05:30

20 lines
984 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);
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);
}
}