Files
Shogi/Shogi.Api/Controllers/Extentions.cs
Lucas Morgan 51d234d871 Replace custom socket implementation with SignalR.
Replace MSAL and custom cookie auth with Microsoft.Identity.EntityFramework
Also some UI redesign to accommodate different login experience.
2024-08-25 03:46:44 +00:00

12 lines
259 B
C#

using System.Security.Claims;
namespace Shogi.Api.Controllers;
public static class Extentions
{
public static string? GetId(this ClaimsPrincipal self)
{
return self.Claims.FirstOrDefault(claim => claim.Type == ClaimTypes.NameIdentifier)?.Value;
}
}