от src избавился

This commit is contained in:
gorbenko.pavel
2026-08-12 12:19:04 +05:00
parent 509f26de7b
commit 4b83d666f1
71 changed files with 67 additions and 1135 deletions
@@ -0,0 +1,13 @@
using System.Security.Claims;
using Tnsu.ApprovalRoute.Application.Common.Interfaces;
namespace Tnsu.ApprovalRoute.Api.Auth;
public sealed class CurrentUserAccessor(IHttpContextAccessor httpContextAccessor) : ICurrentUser
{
public string? Email =>
httpContextAccessor.HttpContext?.User.FindFirstValue(ClaimTypes.Email)
?? httpContextAccessor.HttpContext?.User.FindFirstValue("preferred_username")
?? httpContextAccessor.HttpContext?.User.FindFirstValue("upn")
?? httpContextAccessor.HttpContext?.User.FindFirstValue("unique_name");
}