I am using asp.net core web api this is a piece of code, where i am using registered claims to add username and email in jwt token payload, now the question is.
How can I send user id in registered claims like username and email.
on line number 45 (if you see code image)
(https://i.stack.imgur.com/qCm42.png)
if (userdata!=null)
{
var secretkey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("secret key here");
var signingCredentials = new SigningCredentials(secretkey, SecurityAlgorithms.HmacSha256);
var claims = new[] {
new Claim(JwtRegisteredClaimNames.Name,userdata.Username),
new Claim(JwtRegisteredClaimNames.Email,userdata.Email),
new Claim(JwtRegisteredClaimNames.,userdata.Id),
};