JWT (Json Web Token) Encryption with public key throws Invalid Key Exception error in Java
I am working on an app where I need to send the encrypted JWT token using the public key available in (.der) format but I am facing InvalidKeyException error. Sharing the code and the exception below, any insight on this would be highly appreciated. The library used is nimbus-jose-jwt