mirror of
https://github.com/project-redbud/FunGame-Server.git
synced 2025-04-23 12:39:36 +08:00
11 lines
349 B
C#
11 lines
349 B
C#
using System.Security.Claims;
|
|
using Milimoe.FunGame.WebAPI.Interfaces;
|
|
|
|
namespace Milimoe.FunGame.WebAPI.Architecture
|
|
{
|
|
public class HttpUserContext(IHttpContextAccessor httpContextAccessor) : IUserContext
|
|
{
|
|
public string Username => httpContextAccessor.HttpContext?.User?.FindFirstValue(ClaimTypes.NameIdentifier) ?? "";
|
|
}
|
|
}
|