Add TokenUserInfo class and extend ClaimsPrincipal with methods for user claims retrieval
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m49s

This commit is contained in:
Suphonchai Phoonsawat 2026-03-17 15:47:03 +07:00
parent b1df33dc20
commit 7e0f0485fd
5 changed files with 201 additions and 12 deletions

View file

@ -1,4 +1,5 @@
using BMA.EHR.Domain.Shared;
using BMA.EHR.Domain.Extensions;
using BMA.EHR.Domain.Shared;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@ -81,6 +82,20 @@ namespace BMA.EHR.Domain.Common
}
#endregion
#region " Properties "
protected string? EmpType => User.GetEmpType();
protected Guid? OrgChild1DnaId => User.GetOrgChild1DnaId();
protected Guid? OrgChild2DnaId => User.GetOrgChild2DnaId();
protected Guid? OrgChild3DnaId => User.GetOrgChild3DnaId();
protected Guid? OrgChild4DnaId => User.GetOrgChild4DnaId();
protected Guid? OrgRootDnaId => User.GetOrgRootDnaId();
protected Guid? ProfileId => User.GetProfileId();
protected string? Prefix => User.GetPrefix();
protected string? FullNameFromClaim => User.GetName();
#endregion
#endregion