For those who are looking for RSA (asymmetric keys), You can set the key id while constructing the security credentials (below snippet shows an example).
var accessTokenDescription = new SecurityTokenDescriptor
{
Issuer = "https://example.in",
IssuedAt = DateTime.UtcNow,
NotBefore = DateTime.UtcNow,
Expires = DateTime.UtcNow.AddSeconds(accessTokenExpiry),
SigningCredentials = new SigningCredentials(new RsaSecurityKey(rsa)
{
KeyId = "hello-world"
}, SecurityAlgorithms.RsaSsaPssSha256)
};
When the token is generated, it will have kid in the JWT header like below: