A simple easy to use C# JWT Decoder. Sometimes in a client you just need the token contents. This is meant to get you just that and to validate the token (if you really want to).
Package is avaliable via NuGet. Or you can download and compile it yourself.
- .NET Standard 2.0
string token = "...";
// receive a tupal with all three parts
var decodedToken = JWTDecoder.DecodeToken(token);
JwtHeader header = decodedToken.Header; // contains Algorithm, Type
string payload = decodedToken.Payload; // JSON Payload String
string verification = decodedToken.Verification; // base64 encoded
You can also:
string token = "...";
// parse the payload to an object
var decodedTokenPayload = JWTDecoder.DecodePayload<MyCustomObject>(token);