Verify JWT token using public key


How to verify a jwt token using a public key? The authorization server is a spring boot implementation and it mints jwt key by signing with a private key. How do I verify the minted jwt key using the public key in echo?


Assuming the key is RSA, all you need is . That will return a *rsa.PublicKey which you can give pass it as JWTConfig.SigningKey.

Here’s a more complete example: (that’s for a private key, but it’s similar for public).

Hope it helps!