using Indotalent.Data.Entities; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; using System.Security.Claims; namespace Indotalent.Infrastructure.Authentication.Identity; public class CustomClaimsPrincipalFactory : UserClaimsPrincipalFactory { public CustomClaimsPrincipalFactory( UserManager userManager, RoleManager roleManager, IOptions optionsAccessor) : base(userManager, roleManager, optionsAccessor) { } protected override async Task GenerateClaimsAsync(ApplicationUser user) { var identity = await base.GenerateClaimsAsync(user); identity.AddClaim(new Claim(ClaimTypes.GivenName, user.FullName ?? string.Empty)); return identity; } }