namespace DocuMed.Api.Services;

public class CurrentUserService(IHttpContextAccessor httpContextAccessor) : ICurrentUserService
{
    public string? UserId => httpContextAccessor.HttpContext?.User?.FindFirstValue(ClaimTypes.NameIdentifier);
    public string? RoleName => httpContextAccessor.HttpContext?.User?.FindFirstValue(ClaimTypes.Role);
    public string? UserName => httpContextAccessor.HttpContext?.User?.FindFirstValue(ClaimTypes.Name);
    public string? UniversityId => httpContextAccessor.HttpContext?.User?.FindFirstValue("UniversityId");
    public string? HospitalId => httpContextAccessor.HttpContext?.User?.FindFirstValue("HospitalId");
}