I'm using Identity Server 4 and I've customised my ASP.NET Identity user as follows:
public class ApplicationUser : IdentityUser
{
[MaxLength(100)]
public virtual string FirstName { get; set; }
[MaxLength(100)]
public virtual string LastName { get; set; }
}
I can't see where I would configure Identity Server 4 to include these 2 properties in the claims collection. I've had a look through some of the Identity Server 4 samples but can't see any examples.
I'd ideally like to map these 2 user properties to the given_name
and family_name
claims.
I'm currently hooking up to the notifications and querying the userinfo
endpoint (hybrid flow?). So I'm not sure if this is configuration of Identity Server or customization of the userinfo
endpoint?