Tech Rescue
  • Home
  • Acronyms
  • Cheat-Sheets
  • User Manuals

JWT

How to Forge a JWT with C#

When running tests on APIs we need to be able to create tokens that have specific characteristics to make sure the API responds correctly to each test scenario. I developed a C# script that allows me to do just that. very simple, it can be improved and more options can
Hector Perez Jul 16, 2025
JWT Generation & Verification with HMAC SHA-256 Signature in .NET 6

JWT Generation & Verification with HMAC SHA-256 Signature in .NET 6

This code is the result of a chat session with AI using deepseek-coder-v2-latest model. using System; using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using System.Text; using Microsoft.IdentityModel.Tokens; class Program { static void Main(string[] args) { // Define the security key and algorithm to sign the token var
Hector Perez Jan 13, 2025
Tech Rescue © 2025. Powered by Ghost