How to use the JWT jwt.PublicKeyXml to verify a token with

Is it possible to verify a ServiceStack JWT token with the jwt.PublicKeyXml value from appsettings.json with yes which part of the XML should be used? It’s only for for demonstration purpose…

You can use the exact same APIs to verify a JWT or an Encrypted JWT (JWE) that I answered previously in:

If it’s an encrypted JWE Token the JwtAuthProvider validates the token with the configured Private Key, note the Public Key is not enough as the payload needs to be decrypted with the Private Key.

Yes thanks I remember that…but I need it for demonstration on and I use JWT with JWS (not JWE) so I would like to show it by copying the token to and at the moment the token will be decoded correctly because it’s only simple base64 encoded but I will also demonstrate verifying the signature of the token by pasting my public RSA key to inputfield…

I’ve no experience with that form, but it sounds like you want to convert an exported XML Private Key to a RSA Key in a PEM format? If that’s the case have a look into something like and its implementation it uses to perform the conversion:

ok great …thanks …that’s the solution :smiley: