How to use the JWT jwt.PublicKeyXml to verify a token with https://jwt.io/#encoded-jwt

Is it possible to verify a ServiceStack JWT token with the jwt.PublicKeyXml value from appsettings.json with https://jwt.io/#encoded-jwt...if 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 https://jwt.io/#encoded-jwt and I use JWT with JWS (not JWE) so I would like to show it by copying the token to https://jwt.io/#encoded-jwt 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 https://jwt.io/#encoded-jwt 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 https://superdry.apphb.com/tools/online-rsa-key-converter and its implementation it uses to perform the conversion: https://gist.github.com/misaxi/4642030

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