public override JwtHeader CreateHeader(string signingKeyPath) { using (RSA rsaKey = RSA.Create()) { var xmlKey = File.ReadAllText(signingKeyPath); rsaKey.CustFromXmlString(xmlKey); var signingKey = new RsaSecurityKey(rsaKey); var signingCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.RsaSha256); return(new JwtHeader(signingCredentials)); } }