Theses examples shows up how to generate asymmetric encryption with RSA and ECDsa. Also store them as JWK and recover back from store.
The main goal is to demonstrate how you can use Asymmetric keys with your JWT and solve the problem that many developers has, how to keep signing JWT with same key, even when API restart.
Techs:
- .NET Standard 2.1
- Microsoft.IdentityModel.JsonWebTokens
More details at (pt-BR only):
Bruno Brito - ASP.NET Core - Como assinar digitalmente seu JWT